예제 #1
0
    private void Awake()
    {
        if (_instance != null && _instance != this)
        {
            Destroy(this.gameObject);
            return;
        }

        _instance = this;
    }
예제 #2
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }
예제 #3
0
	void Start ()
	{
		Instance = this;
		DontDestroyOnLoad (gameObject);
	}
예제 #4
0
 void Awake()
 {
     Manager = this;
 }