public void SetCallbacks(ISystemActions instance) { if (m_Wrapper.m_SystemActionsCallbackInterface != null) { @Help.started -= m_Wrapper.m_SystemActionsCallbackInterface.OnHelp; @Help.performed -= m_Wrapper.m_SystemActionsCallbackInterface.OnHelp; @Help.canceled -= m_Wrapper.m_SystemActionsCallbackInterface.OnHelp; } m_Wrapper.m_SystemActionsCallbackInterface = instance; if (instance != null) { @Help.started += instance.OnHelp; @Help.performed += instance.OnHelp; @Help.canceled += instance.OnHelp; } }
public void SetCallbacks(ISystemActions instance) { if (m_Wrapper.m_SystemActionsCallbackInterface != null) { @ToggleCursor.started -= m_Wrapper.m_SystemActionsCallbackInterface.OnToggleCursor; @ToggleCursor.performed -= m_Wrapper.m_SystemActionsCallbackInterface.OnToggleCursor; @ToggleCursor.canceled -= m_Wrapper.m_SystemActionsCallbackInterface.OnToggleCursor; @ToggleOptions.started -= m_Wrapper.m_SystemActionsCallbackInterface.OnToggleOptions; @ToggleOptions.performed -= m_Wrapper.m_SystemActionsCallbackInterface.OnToggleOptions; @ToggleOptions.canceled -= m_Wrapper.m_SystemActionsCallbackInterface.OnToggleOptions; } m_Wrapper.m_SystemActionsCallbackInterface = instance; if (instance != null) { @ToggleCursor.started += instance.OnToggleCursor; @ToggleCursor.performed += instance.OnToggleCursor; @ToggleCursor.canceled += instance.OnToggleCursor; @ToggleOptions.started += instance.OnToggleOptions; @ToggleOptions.performed += instance.OnToggleOptions; @ToggleOptions.canceled += instance.OnToggleOptions; } }