Exemple #1
0
 // Register a callback using this method in order to receive a callback for all
 // VR events of the given name.
 // Example:
 //  public void OnFrameStart(VREvent e) {
 //    Debug.Log(e.ToString());
 //  }
 //
 //  public void Start() {
 //    MinVR.VRMain.Instance.AddOnVREventCallback("FrameStart", this.OnFrameStart);
 //  }
 public void AddOnVREventCallback(string eventName, OnVREventDelegate func)
 {
     if (!genericCallbacks.ContainsKey(eventName))
     {
         genericCallbacks.Add(eventName, new List <OnVREventDelegate>());
     }
     genericCallbacks[eventName].Add(func);
 }
Exemple #2
0
        // -- Routines for registering callbacks --

        // Register a callback using this method in order to receive a callback for every single
        // VR event that occurs.
        // Example:
        //  public void OnVREvent(VREvent e) {
        //    Debug.Log(e.ToString());
        //  }
        //
        //  public void Start() {
        //    MinVR.VRMain.Instance.AddOnVREventCallback(this.OnVREvent);
        //  }
        public void AddOnVREventCallback(OnVREventDelegate func)
        {
            genericCallbacksUnfiltered.Add(func);
        }