Lobby씬에서 다른 씬으로 전환 될때 캐릭터 프리팹 로드 정보 삭제
This commit is contained in:
@@ -68,8 +68,17 @@ namespace TON
|
|||||||
|
|
||||||
public override IEnumerator OnEnd()
|
public override IEnumerator OnEnd()
|
||||||
{
|
{
|
||||||
yield return null;
|
// TON.Player 내부의 캐릭터 삭제
|
||||||
|
GameObject playerObj = GameObject.Find("TON.Player");
|
||||||
|
if (playerObj != null)
|
||||||
|
{
|
||||||
|
foreach (Transform child in playerObj.transform)
|
||||||
|
{
|
||||||
|
GameObject.Destroy(child.gameObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
yield return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user