Detailed Setup
Setting Up The Raycast
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 KCInteractor script to either the main camera or the main player object.
Adding the Managers
Now drag the (from the Prefabs folder into the hierarchy)
KCInputManager
KCUIManager
KCAudioManager
KCInventoryManager
UI Manager Setup
Select the UIManager, which will have the KCUIManager script and make sure all the items are connected as below:
Make sure to add the slots, crosshair and inventory canvas like is under the UIManager object
Inventory Canvas Setup
The Keycard Inventory Canvas is under the UI Manager
Setting up the inventory
Select the KCInventory – This item shouldn’t need editing at all, just make sure it’s on an empty gameobject
Setting up the Input Manager
Select the KCInputManager 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 Keycard Pickup
Tag: InteractiveObject
Add a Box Collider
Add a KCItem script to the object and set the ItemType to Keycard
Add a KCKeyCollectable script and add the appropriate ScriptableObjects and your desired ScriptableObjects audio clip. (Found in the ScriptableObjects folder)
Creating a Scanner with Event
Tag: InteractiveObject
Make sure to add a Box Collider
Add a TKItem script to the object and set the ItemType to Scanner
Add a TKScannerInteractable script and add the appropriate ScriptableObjects and settings:
Remove Key After Use
Should the key be removed from the inventory after using it with the scanner?
Key Scriptable
Add the key scriptable object that is specific for this scanner
Sounds
Add the sound SO's that are in the screenshot below
Unlock Event
The event which happens when the key is inspired, so in my demo this plays the animation from the KCDoorOpen script which is on the prefab object.
Last updated