Quick Setup

QUICK START: You can add the 1- DoorInteractionKit_Full_DemoScene to your project, to get a quick start with every part connected.

Door Rotation:

  • Some door objects may appear flat when dragged from the prefabs folder
    • Set X rotation to -90 to fix this issue


  • The asset uses TextMeshPro (TMP) - Make sure this is added to your project
  1. 1.
    Make sure you have a FPSController
  • Add a DoorInteractor script:
    • Ray Distance: This is how far you can interact with objects
    • Interaction Key: What key should we use for interaction clicks. Default: Mouse 0

Adding Managers:

  1. 2.
    Add a DoorInventory object from the prefabs folder:
  • Inventory Key: What key press do we need to open the inventory
  • Key List: Will fill when you collect object
  1. 3.
    Add a DoorUIManager:
  • Object Names: The InteractText UI elements
  • Locked Door UI: The DoorLockedText UI elements
  • Text Customisation
  • Inventory Fields: Inventory Slot Prefab and Inventory Panel UI
  • Timer: The timers for showing the popup UI
  • Crosshair UI: Add the Crosshair UI here
  1. 4.
    Add a DoorAudioManager
  • You can add the Sounds - ScriptableObjects to this to make them playable

Adding Doors:

  1. 5.
    Add a Door object to your project:
  • Box Collider
  • DoorItem script
    • Show Object Name: Whether you want to interact prompt to show
    • Object Name: Add the interact name here
    • Item Type: Select the Item Type
  • DoorInteractable script
    • Interactable Type: Select a Door or Drawer
    • Door Transform: Add the door to this slot here
    • Door Opening Settings: Set the angle, speeds for opening and closing
    • Sound Delay Settings: Add the sounds scriptable objects and delay the audio if you like
    • Plank Settings: If you want to use planks over the doors to block it. Show it and set how many are above
    • Lock Settings:
    • Spawning Items:
  1. 6.
    Add your Canvases
  • Crosshair Canvas
  • Door Text Prompts Canvas
  • Door Inventory Canvas

Creating Keys:

  1. 7.
    You can create a Key
  • Box Collider
  • Door Item script
    • Set the DoorType to Key
  • Key Collectable script
    • Add the BasementKey ScriptableObject
    • Add the Pickup Sound
Spawning Objects Suggestion:
Spawning items in drawers, make sure the drawer has a mesh collider because you don't want another collider blocking the interaction
  • Box Colliders have a larger area and can block more precise interactions
  • Box colliders are good for general interactions
  • Mesh colliders are more expensive but required when doing things like items in drawers