Detailed Setup

Quick Tips & Troubleshooting

QUICK START: You can add the Entire_Keypad_DemoScene to your scene and it will have all the keypad system setup and ready to use

TextMeshPro Required

  • Please note that TMP will appear as a popup if not installed in your project

  • Click Import TMP Essentials to use the system fully

Tags Reference Guide

  • Raycast:

    • 3D keypad / phone model should be tagged: Keypad

  • Trigger:

    • 3D keypad model should be set to: Untagged

    • FPSController should be tagged: Player

System Setup

Step 1 - Player Setup

  1. Place the FPSController prefab in your scene from the Prefabs folder

    1. Set the FPSController object to the tag of Player

  2. On the MainCamera – Attach CodeDeviceInteractor Script. (If not already).

  3. CodeDeviceInteractor Settings:

    1. Set the InteractDistance (Default: 5)

    2. Set the DeviceTag (Default: CodeDevice)

    3. Set the InputKey (Default: E - Uses the older input system)

Step 2 - UI Manager Setup

  1. Add the UIManager object into the hierarchy and add the following references

Keypad Input Fields (CodeText)

Add out of the UI - Type - InputFields from the children below

Canvas References

Add the canvas' to the correct slot

Raycast Interact Prompt

Add the UI - InteractPrompt from the child below

Trigger Interact Prompt

Add the UI

Crosshair

Add the UI

Persist Across Scenes

Tick this box if you want this manager to stay between scenes

UI Manager Objects

Step 3 - Keypad Audio Manager

  1. Add ONE Audio Manager to the hierarchy

  2. Add the ScriptableObjects named

  3. If you need more help on creating new audio ScriptableObjects:

Adding New Audioclips

Step 4 - Disable Manager

  1. Click the "+" on either the OnPlayerDisabled() or OnPlayerEnabled() to add new events

  2. I disable the FirstPersonController script by selecting the FirstPersonController > Bool Enabled

  3. I disable the CodeDeviceInteractor when the player is disabled

  4. I actually enable the CodeDeviceUIManager.ShowCrosshair

Disabling Player

Step 5 - Setting up 3D Keypad Model

  1. Open any of the Raycast or Trigger keypad collections and find the Keypad 3D model

  2. Set tag: DeviceCode (If using for a FirstPerson setup)

  3. Has the DeviceCodeItem script attached with the controller added to the slot

  4. Has a Box Collider

Step 6 - Keypad / Phone Controller Setup

  1. Add a Keypad / Phone controller to any empty gameobject or similar

  2. Take a look at the Controller script for that set of objects - See settings below

Keypad Type

Choose: Modern, Scifi, Keyboard, Bomb

Input Limit

Set character limit, based on the code you’ve just chosen

Code List

  • Set the array size to add more code options

  • Inside each option is a Codes to set the code you would like player to input

  • Then an event to activate when this code is input into the keypad

Closing Input

This is the input used to close the keypad

Keypad Interaction Sounds

Add the ScriptableObject objects from the corresponding folder

Keypad Input Sounds

Add the ScriptableObject objects from the corresponding folder

Trigger Event

Set whether this is a trigger event version by selecting the check box, if true. You will get another option to add the trigger object

Step 7 - Unlock Event:

Unlock Event

Last updated

Was this helpful?