Detailed Setup

Quick Tips & Troubleshooting

QUICK START: You can add the Emblem Demo Scene to your scene and it will have all the system setup and ready to use

TextMeshPro Required

  • Please note that TMP will appear as a popup if not installed in your project

  • Click Import TMP Essentials to use the system fully

Tags & Layers Reference

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!

System Setup

Step 1 - Setting Up The Player

  1. When starting your new project please import an FPSController into your project. (Add an FPSController prefab to your scene.)

  2. You can add the EmblemInteractor script to either the main camera or the main player object.

    1. Interact Distance: The distance you can interact with an object

    2. Interact Key: Set the key input from the system

    3. Tag: InteractiveObject is the tag used in the system

Step 2 - Adding the Managers

Now drag the managers (from the Prefabs folder into the hierarchy)

  1. EmblemUIManager

  2. EmblemAudioManager

  3. EmblemInventoryManager

NOTE: Only drag this prefab into the hierarchy, not the scene

Step 3 - UI Manager Setup

  1. Select the UI Manager - which will have the EmblemUIManager script and make sure all the items are connected

All UI objects will be below this parent in the canvas

Fields
Description

Slot Prefab

Add the Inventory Slot prefab from the prefab folder

Inventory Panel

Add the Inventory Container from the Key Inventory Canvas

Inventory Fade Duration

Set the fade time before opening or closing the inventory

Crosshair

Add the UI - Crosshair UI object

Persistence

Set whether you want to keep this between scenes

Step 4 - Inventory Canvas Setup

  1. The Key Inventory Canvas is a child of 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.

Step 5 - Setting up the inventory

  1. Select the EmblemInventory

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

Step 6- Setting up the Audio Manager

  1. Select the AudioManager and add the ScriptableObjects for sounds you will have created. (The ScriptableObjects folder will have some examples)

Adding Audioclips

Step 7 - 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.

Setting up the a Key Collectable:

  1. Tag: InteractiveObject

  2. Add a Box Collider

  3. Add a EmblemItem script to the object and set the ItemType to Key

  4. Add a EmblemKeyCollectable script and add the appropriate ScriptableObjects and your desired ScriptableObjects audio clip. (Found in the ScriptableObjects folder)

Step 8 - 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.

Setting up the a Interactive Door:

  1. Tag: InteractiveObject

  2. Make sure to add a Box Collider

  3. Add a EmblemItem script to the object and set the ItemType to Door

  4. Add a EmblemDoorInteractable script and add the appropriate ScriptableObjects and settings

  5. Door Event can be seen here

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 EmblemDoorController script which is on the prefab object.

Last updated