Detailed Setup
NOTE: You can get a quick start using the Entire_ThemedKey_DemoScene object and drag that straight into your scene. This will everyone to be already setup, you can delete the art assets as required but checkout the demo scene if you’re confused!
If you're using multiple puzzle assets from my store, check this page below for conflicts that you might come across and ways to fix them!
Player:
Layer of: Ignore Raycast
Any Interactable Object:
Tag InteractiveObject or as per the raycast script on the main camera, it will have the tag you need!
Setting Up The Raycast
When starting your new project please import an FPSController into your project. Add an FPSController prefab to your scene. (Unless you’re using the demo which will already have one added but the package will be required to be imported before use). You can add the TKRaycast script to either the main camera or the main player object.
Adding the Managers
Now drag the (from the Prefabs folder into the hierarchy)
TKInputManager
TKUIManager
TKAudioManager
TKInventoryManager
NOTE: Only drag this prefab into the hierarchy, not the scene.
UI Manager Setup
Select the UIManager, which will have the TKUIManager script and make sure all the items are connected as below:
All UI objects will be below this parent in the canvas
Make sure to add the slots, crosshair and inventory canvas like is under the UIManager object
Inventory Canvas Setup
The Key Inventory Canvas is under the UI Manager
The system uses a CanvasGroup on the main Canvas object which controls how to show and display the UI. It will fade the canvas in and out.
Setting up the inventory
Select the TKInventory – This item shouldn’t need editing at all, just make sure it’s on an empty gameobject
We don't need to do anything with this script, it will be updated automatically!
Setting up the Input Manager
Select the InputManager and make sure you choose button commands that you wish, from the dropdowns
Setting up the Audio Manager
Select the AudioManager and add the ScriptableObjects for sounds you will have created. (The ScriptableObjects folder will have some examples)
Creating a Key Pickup
You can add a key from the prefabs folder, all of the details should already be setup but check the details below to make sure.
Tag: InteractiveObject
Add a Box Collider
Add a TKItem script to the object and set the ItemType to Key
Add a TKKeyCollectable script and add the appropriate ScriptableObjects and your desired ScriptableObjects audio clip. (Found in the ScriptableObjects folder)
Creating an interactive door
You can add a door from the prefabs folder, all of the details should already be setup but check the details below to make sure.
Tag: InteractiveObject
Make sure to add a Box Collider
This object should have an Animator component
Add a TKItem script to the object and set the ItemType to Door
Add a TKDoorInteractable script and add the appropriate ScriptableObjects and settings:
Last updated