게임 개발
[unity] 코드 구역 구분 하기
Heeyeon Choi
2022. 10. 5. 17:26
728x90
728x90
//#region? 구역 구분
#region singleton
public static GameManager instance = null;
private void Awake()
{
if (null == instance)
{
instance = this;
DontDestroyOnLoad(this.gameObject);
}
else
{
Destroy(this.gameObject);
}
}
#endregion
728x90