Пример #1
0
 void Awake()
 {
     if (use == null)
     {
         use = this;
         DontDestroyOnLoad(this.gameObject);
         Debug.Log("LedsControl singleton set to DontDestroyOnLoad");
     }
     else
     {
         Debug.LogWarning("LedsControl singleton already in scene, auto-destroying");
         Destroy(this);
     }
 }
Пример #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            LedsControl ljd = new LedsControl();

            ljd.Show();
        }