Where are inputs?

Where is the input reference?

There are TWO input reference in this package and it is located below:

  • KeypadInteractor script has an input for interacting with objects with the raycast

  • KeypadController script has an input for opening and closing the keypads

  • KeypadTrigger script for closing the keypads from trigger events

  • Edit the input keys in the KPInputManager script

Changing the Input:

KPInputManager:

public class KPInputManager : MonoBehaviour
{
    [Header("Raycast Pickup Input")]
    public KeyCode interactKey;
    public KeyCode closeKey;

    [Header("Trigger Inputs")]
    public KeyCode triggerInteractKey;

    public static KPInputManager instance;
}

KeypadController:

private void Update()
{
    if (isOpen && Input.GetKeyDown(KPInputManager.instance.closeKey))
    {
        CloseKeypad();
    }
}

KeypadInteractor:

if (keypadItem != null)
{
    if (Input.GetKeyDown(KPInputManager.instance.interactKey))
    {
         keypadItem.ShowKeypad();
    }
}

KeypadTrigger:

void ShowKeypadInput()
{
    if (canUse && Input.GetKeyDown(KPInputManager.instance.triggerInteractKey))
    {
        keypadObject.ShowKeypad();
        KPUIManager.instance.ShowInteractPrompt(false);
    }
}

Last updated