Keypad Sys - Setup
Keypad System - Video Setup
Keypad Controller Main Setup
How to add a trigger event to for this system?
Basic Steps
Keypad Objects Setup
I have created a basic setup for organising the system, an empty gameobject to hold all of the keypad assets:
Keypad_Controller
Keypad_Canvas
Keypad_Model
Keypad_Door

Keypad Controller Setup

Keypad Parameters:
Valid Code
The string code for the player to match with their input
Character Lim
The amount of characters in your code
UI Elements:
Code Text
The InputField from the Keypad Canvas
Keypad Canvas
The entire Keypad Canvas from the associated object
Trigger Type - ONLY If using a trigger event:
Trigger Event
Add the "Padlock Trigger" which will be a gameobject you create
IsPadlockTrigger
Tick if you're using a Padlock Trigger
Unlock Events:
public class KeyPadDoorController : MonoBehaviour
{
private Animator anim;
private void Start()
{
anim = GetComponent<Animator>();
}
public void PlayAnimation()
{
//This is an example of playing the "DoorOpen" animation
anim.Play("OpenDoor", 0, 0.0f);
}
}
Keypad Model Item Controller

Keypad - Canvas Setup
NOTE: This only needs to be done if you’re setting the canvas buttons yourself or if anything might be missing.


Default Controls
Last updated
Was this helpful?