🗝️
Emblem Key System - Doc
  • Emblem Key Door Sys - Introduction
  • ⭐Getting Started
    • Quick Start
    • Detailed Setup
    • JSON Save System
  • ❓Support
    • FAQ
    • Unlock Event
    • Adding Audioclips
    • Adding More Keys
    • System Namespace
    • Using multiple puzzles?
    • Key Scriptables Missing?
    • Where are Inputs located?
  • 🌀Development
    • Patch Notes - V1.5
    • Roadmap
  • 📧Contacts
    • Contact Me
    • My Other Assets
Powered by GitBook
On this page
  • Setting Up The Raycast
  • Adding the Managers
  • UI Manager Setup
  • Inventory Canvas Setup
  • Setting up the inventory
  • Setting up the Audio Manager
  • Creating a Key Pickup
  • Creating an interactive door
  1. Getting Started

Detailed Setup

PreviousQuick StartNextJSON Save System

Last updated 11 months ago

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)

    • 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 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:

Remove Key After Use

Should the key be removed from the inventory after using it with the door?

Key Scriptable

Add the key scriptable object that is specific for this door

Animated Door Key

Add the animated key which is parented to this asset

Sounds

Add the sound SO's that are in the screenshot below

Key Audio Delay

The delay before the audio for key insert will play. Default: 0.5 seconds

Door Open Delay

The delay before the door opening sound will play. Default: 1.5 seconds

Animation Event

The event which happens when the key is inspired, so in my demo this plays the animation from the TKDoorOpen script which is on the prefab object.

v1.5 now using a JSON save system and you can find more information

⭐
here
Adding Audioclips
Using multiple puzzles?