Exemplo n.º 1
0
 void Start()
 {
     if (TableAnchor.instance == null)
     {
         TableAnchor.instance = this;
     }
     else
     {
         if (TableAnchor.instance != this)
         {
             Destroy(TableAnchor.instance.gameObject);
             TableAnchor.instance = this;
         }
     }
 }
Exemplo n.º 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);
 }