private void Awake() { //싱글턴 인스턴트 생성------ if (instance) { DestroyImmediate(gameObject); return; } instance = this; //-------------------------- //제거 방지 DontDestroyOnLoad(gameObject); }
private void Awake() { instance = this; }