Lobby씬에서 다른 씬으로 전환 될때 캐릭터 프리팹 로드 정보 삭제

This commit is contained in:
aube.lee
2025-02-01 23:40:44 +09:00
parent 54a878618a
commit 0e216fb3d4

View File

@@ -68,8 +68,17 @@ namespace TON
public override IEnumerator OnEnd()
{
// TON.Player 내부의 캐릭터 삭제
GameObject playerObj = GameObject.Find("TON.Player");
if (playerObj != null)
{
foreach (Transform child in playerObj.transform)
{
GameObject.Destroy(child.gameObject);
}
}
yield return null;
}
}