public void SetCallbacks(ICameraControlsActions instance) { if (m_Wrapper.m_CameraControlsActionsCallbackInterface != null) { @Movement.started -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnMovement; @Movement.performed -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnMovement; @Movement.canceled -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnMovement; @Rotation.started -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnRotation; @Rotation.performed -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnRotation; @Rotation.canceled -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnRotation; @Zoom.started -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnZoom; @Zoom.performed -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnZoom; @Zoom.canceled -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnZoom; } m_Wrapper.m_CameraControlsActionsCallbackInterface = instance; if (instance != null) { @Movement.started += instance.OnMovement; @Movement.performed += instance.OnMovement; @Movement.canceled += instance.OnMovement; @Rotation.started += instance.OnRotation; @Rotation.performed += instance.OnRotation; @Rotation.canceled += instance.OnRotation; @Zoom.started += instance.OnZoom; @Zoom.performed += instance.OnZoom; @Zoom.canceled += instance.OnZoom; } }
public void SetCallbacks(ICameraControlsActions instance) { if (m_Wrapper.m_CameraControlsActionsCallbackInterface != null) { @Rotate.started -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnRotate; @Rotate.performed -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnRotate; @Rotate.canceled -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnRotate; } m_Wrapper.m_CameraControlsActionsCallbackInterface = instance; if (instance != null) { @Rotate.started += instance.OnRotate; @Rotate.performed += instance.OnRotate; @Rotate.canceled += instance.OnRotate; } }
public void SetCallbacks(ICameraControlsActions instance) { if (m_Wrapper.m_CameraControlsActionsCallbackInterface != null) { @RotateEnable.started -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnRotateEnable; @RotateEnable.performed -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnRotateEnable; @RotateEnable.canceled -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnRotateEnable; @RotateDisable.started -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnRotateDisable; @RotateDisable.performed -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnRotateDisable; @RotateDisable.canceled -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnRotateDisable; @Zoom.started -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnZoom; @Zoom.performed -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnZoom; @Zoom.canceled -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnZoom; @RotateCameraWithMouseX.started -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnRotateCameraWithMouseX; @RotateCameraWithMouseX.performed -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnRotateCameraWithMouseX; @RotateCameraWithMouseX.canceled -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnRotateCameraWithMouseX; @RotateCameraWithButtons.started -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnRotateCameraWithButtons; @RotateCameraWithButtons.performed -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnRotateCameraWithButtons; @RotateCameraWithButtons.canceled -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnRotateCameraWithButtons; @RotateCameraWithMouseY.started -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnRotateCameraWithMouseY; @RotateCameraWithMouseY.performed -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnRotateCameraWithMouseY; @RotateCameraWithMouseY.canceled -= m_Wrapper.m_CameraControlsActionsCallbackInterface.OnRotateCameraWithMouseY; } m_Wrapper.m_CameraControlsActionsCallbackInterface = instance; if (instance != null) { @RotateEnable.started += instance.OnRotateEnable; @RotateEnable.performed += instance.OnRotateEnable; @RotateEnable.canceled += instance.OnRotateEnable; @RotateDisable.started += instance.OnRotateDisable; @RotateDisable.performed += instance.OnRotateDisable; @RotateDisable.canceled += instance.OnRotateDisable; @Zoom.started += instance.OnZoom; @Zoom.performed += instance.OnZoom; @Zoom.canceled += instance.OnZoom; @RotateCameraWithMouseX.started += instance.OnRotateCameraWithMouseX; @RotateCameraWithMouseX.performed += instance.OnRotateCameraWithMouseX; @RotateCameraWithMouseX.canceled += instance.OnRotateCameraWithMouseX; @RotateCameraWithButtons.started += instance.OnRotateCameraWithButtons; @RotateCameraWithButtons.performed += instance.OnRotateCameraWithButtons; @RotateCameraWithButtons.canceled += instance.OnRotateCameraWithButtons; @RotateCameraWithMouseY.started += instance.OnRotateCameraWithMouseY; @RotateCameraWithMouseY.performed += instance.OnRotateCameraWithMouseY; @RotateCameraWithMouseY.canceled += instance.OnRotateCameraWithMouseY; } }