How To Create a Key

Creating Key ScriptableObject

circle-info
  1. You can create a ScriptableObject by righting click the hierarchy and creating a Key object

    1. Key Name: Add the keys name here

    2. Key Sprite: Add the sprite to use for the key object

    3. Key ID: A unique indentifying number to be used as saving information for the inventory

circle-exclamation

Creating Key Collectable

circle-info
  1. Add a 3D object of a key to your scene and make sure it is setup as below:

    1. Box Collider

    2. InteractablePrompt script (Optional Component)

  2. Key Collectable script

    1. KeyScriptable: Add the relevant ScriptableObject to this slot

    2. Pickup Sound: Add a pickup sound of your choice

Last updated