Пример #1
0
 static void ReleaseResources()
 {
     if (_thread != null)
     {
         _thread.Dispose();
         _thread = null;
     }
 }
Пример #2
0
        static SenselMaster()
        {
            if (SenselDevice.GetDeviceList().num_devices > 0)
            {
                _thread = new SenselThread();
            }

        #if UNITY_EDITOR
            // To release the internal objects on script recompilation.
            UnityEditor.AssemblyReloadEvents.beforeAssemblyReload += ReleaseResources;
        #endif
        }