🔢
Keypad System - Doc
  • Keypad System - Introduction
  • ⭐Getting Started
    • Quick Start
    • Detailed Setup
    • Keypad Canvas - Setup
  • ❓Support
    • FAQ
    • Unlock Event
    • Missing UI Text?
    • Where are inputs?
    • Adding New Design
    • Stopping Interaction
    • Adding Trigger Event
    • Change Keypad Style
    • Adding New Audioclips
    • Adding Additional Keypads
    • Different Character Controller
  • 🌀Development
    • Patch Notes - V1.5
    • Roadmap
  • 📧Contacts
    • Contact Me
    • My Other Assets
Powered by GitBook
On this page
  • Where is the input reference?
  • Changing the Input:

Was this helpful?

  1. Support

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);
    }
}

PreviousMissing UI Text?NextAdding New Design

Last updated 1 year ago

Was this helpful?

❓