반응형
https://zimamderotech.tistory.com/89
protected void RemoveAllChild(Transform targetParent)
{
var children = targetParent.transform.GetComponentsInChildren<Transform>(true);
foreach (var child in children)
{
if (child == targetParent) continue;
child.parent = null;
Destroy(child.gameObject);
}
}
반응형
'Unity > Unity 이슈' 카테고리의 다른 글
[Unity] Package Mannger 버전 올리기 (0) | 2022.11.30 |
---|---|
Unity Build 에러 (0) | 2022.11.24 |
싱글톤 GameObject가 계속 늘어날 때 (0) | 2022.03.27 |
[Addressable] JSON parse error: Invalid value. (0) | 2022.02.27 |
[구글로그인] DEBUG: Authentication canceled (0) | 2022.02.27 |