Esempio n. 1
0
 private void Awake()
 {
     if (instance == null)
         instance = this;
     else if (instance != this)
     {
         Debug.LogError($"There are 2 or more instance of \'{nameof(LuviConsole)}\' on the scene. The latest instance will be destroy.");
         Destroy(gameObject);
         return;
     }
     Initialize();
 }
Esempio n. 2
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Debug.LogError($"There are 2 or more \'{NAME}\' on the scene. The new instance will be destroy.");
         Destroy(gameObject);
         return;
     }
     Initialize();
 }