How To Create a Key

Creating Key ScriptableObject:

  • You can create a ScriptableObject by right click the hierarchy and creating a Key
    • Key Name: Add the Key Name
    • Key Sprite: Add the sprite to use for the key object

Creating Key Collectable:

  • Add a 3D object of a key to your scene and make sure it is setup as below:
    • Box Collider
    • Door Item script
      • Set the DoorType to Key
    • Key Collectable script
      • Add the BasementKey ScriptableObject
        • Add the Pickup Sound