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
'게임 개발' 카테고리의 다른 글
[unity] raycast 사용하기 (0) | 2022.08.07 |
---|---|
[유니티] culling mask 해도 UI 요소가 보일 경우 (0) | 2022.08.03 |
[유니티] 드리프트 구현 및 충돌 탐지 구현 (0) | 2022.07.18 |
Unity로 printf(”helloGachon!”); 게임개발일지 (0) | 2022.05.26 |