Example #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);
        }
Example #2
0
 /*
  * constructor
  */
 public TalonRing(TalonBridge talon, TalonConfig config, string deviceId)
 {
     this.talon    = talon;
     this.deviceId = deviceId;
     this.config   = new TalonConfig(config);
 }