void OnDestroy() { #if (!NDEBUG && DEBUG && ENABLE_LOG) Console.WriteLine($"{TAG}OnDestroy:"); #endif StopAll(); Unregister(callback); callback = null; }
//-------------------------------------------------------------------------------- // UnityEngineからの呼び出し //-------------------------------------------------------------------------------- // Start is called before the first frame update IEnumerator Start() { #if (!NDEBUG && DEBUG && ENABLE_LOG) Console.WriteLine($"{TAG}Start:"); #endif mainContext = SynchronizationContext.Current; callback = new OnDeviceChangedFunc(OnDeviceChanged); Register(callback); yield return(Initialize()); }
private static extern IntPtr Unregister(OnDeviceChangedFunc callback);