You can drag the "Entire_DemoScene_Prefab" into your game to get a really quick start, it will have everything ready to go!
Note before Starting:
No tags or layers are required for this package
All keypads that use the raycast will need the tag of "Keypad" as seen in the "KeypadRaycast" script
1. Place the “FPSController_Prefab” prefab in your scene from the “Keypad System > Prefabs” folder.
On the MainCamera – Attach “KeypadRaycast” Script. (If not already).
Make sure your FPSController or player has a layer of "Ignore Raycast"
2. Add “Crosshair_Canvas_Prefab” from the “Managers – One Per Scene” folder to your Hierarchy from prefabs folder. NOTE: Don’t drag this into the scene view, only the Hierarchy.
3. Add “EventSystem_Prefab” to your scene. NOTE: Have only ONE event system at any time.
4. Also add a “DisableManager”, “AudioManager” and “InputManager” to your hierarchy.
5. You can choose to add one of the “Demo_Prefabs” to your scene. (Please drag one of those out to the hierarchy! This should include: A keypad controller, Keypad canvas, Keypad model, Keypad code and a Door model.
6. As above, you can add each of these items separately if you wish. Note: Don’t drag any canvas’ into the scene, only the Hierarchy.
7. Make sure any “Keypad_Model” you use is
Have a “KeypadItemController” script attached, add the connecting “KeypadController” gameobject to the slot. (If not already added and attached).
8. Add “DoorController” script to any door object you have, if not already.
9. On “KeypadRaycast” (On MainCamera)
Add “Crosshair” UI image from the “Crosshair_Canvas_Prefab” (In the Hierarchy) to “Crosshair” slot in inspector.
10. Click on any of your “Keypad Controller” objects (Some of these might already be attached for you).
Make sure this object has a “KeyController” and “KeypadContoller” script attached.
Choose your valid code for door
Set character limit, based on the code you’ve just chosen
Add “CodeInputField” from “KeyPadCanvas” Canvas to “CodeText” in inspector
Add your canvas to the “Keypad Canvas” slot in the inspector (This is so we can disable the keypad UI at any time!
Add “KeyPad_Model_Prefab” GameObject to “KeyPadModel” slot in inspector
Sound Effect Names
Add the names of the sound effects you wish to use from the "AudioManager" GameObject
Unity Event (UNLOCK)
I have added a Unity event call for when you get the code correct
Click the little “+” icon in the bottom right, it will add a new event and you can place any gameobject which may have a script with a public method you want to call.
In this case I have added the door object, this has a script called “KeypadDoorController” which has a public method called “PlayAnimation”.
You can then run this code each time you unlock something, this can be changed on each door, and multiple events can happen in each! Making life really easy! (If you need any help do let me know).