/// <summary>
 /// Set instance for settings object and initialize callbacks of UI
 /// </summary>
 private void Awake()
 {
     // Check singleton, each time the menu scene is loaded, the instance is replaced with the newest script
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this.gameObject);
     }
 }
Пример #2
0
        /// <summary>
        /// Callback method for the Resolver gets called each time the resolver found a stream
        /// </summary>
        /// <param name="stream"></param>
        public virtual void AStreamIsFound(LSLStreamInfoWrapper stream)
        {
            if (!isTheExpected(stream))
            {
                return;
            }

            ExciteOMeterManager.DebugLog(string.Format("LSL Stream {0} found for {1}", stream.Name, name));

            // In case the signal emulator is running. Deactivate it.
            EoM_SignalEmulator.DisableEmulator();

            inlet            = new LSL.liblsl.StreamInlet(stream.Item);
            expectedChannels = stream.ChannelCount;

            OnStreamAvailable();
        }