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

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