Exemplo n.º 1
0
        void Awake()
        {
            if (_instance != null)
            {
                Debug.LogError("More than one Talon instance was found in your scene");
                enabled = false;
                return;
            }
            _instance = this;
            connectedRings.Clear();

#if UNITY_EDITOR || UNITY_STANDALONE_OSX || UNITY_IOS || UNITY_STANDALONE_WIN || UNITY_WSA
            talon = new NativeTalonBridge();
#elif UNITY_ANDROID && !UNITY_EDITOR
            talon = new AndroidTalonBridge();
#else
            talon = new DummyTalonBridge();
#endif
            talon.Init(this.gameObject, config);
        }
Exemplo n.º 2
0
 void OnDestroy()
 {
     connectedRings.Clear();
     talon.Dispose();
     _instance = null;
 }