Phone Sys - Setup

Phone System - Video Setup

Phone Controller Main Setup

How to add a trigger event to for this system?

Basic Steps

  1. I'd recommend adding the "Phone_Objects" from the "Prefabs > Individual_Prefabs > Single Objects" section this should include a:

    1. Phone Canvas Object

    2. Phone Controller Object

    3. Phone Model Object

  2. Phone_Controller should have a:

    1. "PhonePadKeyController" script attached

    2. "PhonePadController" script attached

  3. Phone_Canvas

  4. Phone Model should have a:

    1. "AKItemController" script attached with "PhoneSys"

    2. "PhonePadItemController" script attached

    3. "Box Collider" attached

    4. Tag of "InteractiveObject" and layer of "Interact"

Phone Objects Setup

  • I have created a basic setup for organising the system, an empty gameobject to hold all of the keypad assets:

    • Phone_Controller

    • Phone_Canvas

    • Phone_Model

Phone Controller Setup

This object should be an empty GameObject and it will control everything that goes on for your flashlight system!

Make sure this object has a "PhonePadKeyController" and a "PhonePadController" script with custom settings!

Keypad Parameters:

Character Lim

The amount of characters in your code

Phone Codes:

Phone Code

The InputField from the Keypad Canvas

Phone Clip

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

Phone Model Item Controller

Add this script to a 3D Phone model from the prefabs or one you may have created yourself

  • Make sure your object has a tag of "InteractiveObject" and a Layer of "Interact"

  • Add a "Box Collider" to your object

  • Add an "AKItemController" - Set the System Type to: "PhoneSys"

  • Add a "PhonepadItemController" script to the object

    • KeypadController variable: Add the connected "Phone_Controller" object

Phone - Canvas Setup

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

Select and open out your “KeypadCanvas” (In Hierarchy) to find all the elements.

Select any of the Button numbers, add an “OnClick()” event in the bottom right of the inspector by clicking the “+”. (Unless it already has one added, image below).

Add your “PhonePadController” object to the available slot (This will link the keycontroller script which exists on that object).

On the drop down on the right, (No function dropdown if nothing is selected) choose the “KeyController” option which will open out into more.

Choose “KeyController.KeyPressString”

You can then add whatever number or keyboard symbol you like in the slot below the dropdown. Continue this for each button available.

NOTE: Similar setup for the CLOSE / CLEAR / ENTER Button.

Select any of the input keys, add an “OnClick()” event in the bottom right of the inspector by clicking the “+”.

Add your “KeyPadController” to the available slot

On the drop down on the right, choose the “KeyController” option which will open out into more. Choose “KeyController.KeyPressClose” or “KeyController.KeyPressClr” or “KeyController.KeyPress.Ent” to the corresponding buttons.

Default Controls

  • Left Click to interact with a pickup

  • Use the "Esc" Key on each of the keypads to exit the keypad

You can change these in the "InputManager"

Last updated