public void SetCallbacks(ITankActions instance) { if (m_Wrapper.m_TankActionsCallbackInterface != null) { @Move.started -= m_Wrapper.m_TankActionsCallbackInterface.OnMove; @Move.performed -= m_Wrapper.m_TankActionsCallbackInterface.OnMove; @Move.canceled -= m_Wrapper.m_TankActionsCallbackInterface.OnMove; @Jump.started -= m_Wrapper.m_TankActionsCallbackInterface.OnJump; @Jump.performed -= m_Wrapper.m_TankActionsCallbackInterface.OnJump; @Jump.canceled -= m_Wrapper.m_TankActionsCallbackInterface.OnJump; @Aim.started -= m_Wrapper.m_TankActionsCallbackInterface.OnAim; @Aim.performed -= m_Wrapper.m_TankActionsCallbackInterface.OnAim; @Aim.canceled -= m_Wrapper.m_TankActionsCallbackInterface.OnAim; @Shoot.started -= m_Wrapper.m_TankActionsCallbackInterface.OnShoot; @Shoot.performed -= m_Wrapper.m_TankActionsCallbackInterface.OnShoot; @Shoot.canceled -= m_Wrapper.m_TankActionsCallbackInterface.OnShoot; } m_Wrapper.m_TankActionsCallbackInterface = instance; if (instance != null) { @Move.started += instance.OnMove; @Move.performed += instance.OnMove; @Move.canceled += instance.OnMove; @Jump.started += instance.OnJump; @Jump.performed += instance.OnJump; @Jump.canceled += instance.OnJump; @Aim.started += instance.OnAim; @Aim.performed += instance.OnAim; @Aim.canceled += instance.OnAim; @Shoot.started += instance.OnShoot; @Shoot.performed += instance.OnShoot; @Shoot.canceled += instance.OnShoot; } }