Inventory Pro

Custom character controller


When using your own character controller you're required to implement the IInventoryPlayerController interface. The IInventoryPlayerController is used to enable / disable the controller when the UI requests it.

Example code


public partial class InventoryUFPSInputController : MonoBehaviour, IInventoryPlayerController
{
    public bool isEnabled = true;

    private void Update()
    {
        if(isEnabled)
        {
            // Do your controller code.
        }
    }

    public virtual void SetActive(bool val)
    {
        // Enable / disable your controller.
        isEnabled = val;
    }
}