void Awake() { if (_instance == null) { _instance = this; } }
// Use this for initialization void Start() { if (_instance == null) { _instance = this; } DontDestroyOnLoad(this); }
void Awake() //싱글턴 { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }