예제 #1
0
        void OnDestroy()
        {
#if (!NDEBUG && DEBUG && ENABLE_LOG)
            Console.WriteLine($"{TAG}OnDestroy:");
#endif
            StopAll();
            Unregister(callback);
            callback = null;
        }
예제 #2
0
        //--------------------------------------------------------------------------------
        // 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());
        }
예제 #3
0
 private static extern IntPtr Unregister(OnDeviceChangedFunc callback);