public void ResetHand() { myHandController.Success -= MyHandController_Success; Destroy(HandContainner.GetComponentInChildren <MyHandController>().gameObject); Instantiate(HandPrefab, HandContainner.transform); myHandController = HandContainner.GetComponentInChildren <MyHandController>(); UnityEngine.Debug.Log(myHandController); myHandController.Success += MyHandController_Success; }
void Start() { Ip = GetIp(); myHandController = HandContainner.GetComponentInChildren <MyHandController>(); unetClientBase = gameObject.GetComponent <UnetClientBase>(); unetClientBase.ConnectionEvent += UnetClientBase_ConnectionEvent; unetClientBase.DisconnectionEvent += UnetClientBase_DisconnectionEvent; unetClientBase.DataEvent += UnetClientBase_DataEvent; }
void Start() { Ip = GetIp(); myHandController = HandContainner.GetComponentInChildren <MyHandController>(); UnityEngine.Debug.Log(myHandController); unetClientBase = gameObject.GetComponent <UnetClientBase>(); unetClientBase.ConnectionEvent += UnetClientBase_ConnectionEvent; unetClientBase.DisconnectionEvent += UnetClientBase_DisconnectionEvent; unetClientBase.DataEvent += UnetClientBase_DataEvent; myHandController.Success += MyHandController_Success; ConnectedToServer(); }