Синтаксис:
Используется csharp
string cell;
cell = "cell_" + (MyIndex+1);
Debug.Log (cell);
GameObject.Find (cell).GetComponent<UnityEngine.UI.Button> ().onClick.RemoveAllListeners ();
GameObject.Find (cell).GetComponent<UnityEngine.UI.Button> ().onClick.AddListener (()=> MyRune.OnMouseDown());
Debug.Log ("Current number of listeners:"+GameObject.Find (cell).GetComponent<UnityEngine.UI.Button> ().onClick.GetPersistentEventCount ());
}
cell = "cell_" + (MyIndex+1);
Debug.Log (cell);
GameObject.Find (cell).GetComponent<UnityEngine.UI.Button> ().onClick.RemoveAllListeners ();
GameObject.Find (cell).GetComponent<UnityEngine.UI.Button> ().onClick.AddListener (()=> MyRune.OnMouseDown());
Debug.Log ("Current number of listeners:"+GameObject.Find (cell).GetComponent<UnityEngine.UI.Button> ().onClick.GetPersistentEventCount ());
}