void OnDisable() { Debug.Log("on disable"); if (touchControlStream != null) { touchControlStream.Close(); } if (bridge != null) { bridge.dispose(); } vox.OnDisable(); //ledseq.close(); if (touchControlThread != null) { touchControlThread.Interrupt(); touchControlThread.Join(); } }
void OnDisable() { UnityEngine.Debug.Log("on disable"); if (bridge != null) { bridge.dispose(); } if (NeedObjectVox) { vox.OnDisable(); } if (NeedSaveSeq) { ledseq.close(); } foreach (Thread w in workers) { w.Interrupt(); w.Join(); } }