Пример #1
0
 void Start()
 {
     if (TableAnchor.instance == null)
     {
         TableAnchor.instance = this;
     }
     else
     {
         if (TableAnchor.instance != this)
         {
             Destroy(TableAnchor.instance.gameObject);
             TableAnchor.instance = this;
         }
     }
 }
Пример #2
0
 // Start is called before the first frame update
 void Start()
 {
     if (TableAnchor.instance == null)
     {
         TableAnchor.instance = this;
     }
     else
     {
         if (TableAnchor.instance != this)
         {
             Destroy(TableAnchor.instance.gameObject);
             TableAnchor.instance = this;
         }
     }
     Debug.Log("Table Created");
     DontDestroyOnLoad(this.gameObject);
 }