Ejemplo n.º 1
0
    //To remove a listener for Analog sensors
    public static void StopListeningAnalog(VRPNManager.Analog_Types deviceType, VRPNDeviceConfig.Device_Names deviceName, UnityAction <string, VRPNAnalog.AnalogReport> listener)
    {
        if (eventManager == null)
        {
            Debug.LogError("There needs to be one active EventManger script on a GameObject in your scene.");
            return;
        }
        VRPNAnalogEvent thisEvent = null;

        if (instance.eventDictionaryAnalog.TryGetValue(deviceType.ToString() + " " + deviceName.ToString(), out thisEvent))
        {
            thisEvent.RemoveListener(listener);
        }
    }