🚪
Door Interaction Kit - Doc
  • Introduction
  • ⭐Getting Started
    • Quick Setup
    • Changing Door Key
    • How To Create a Key
    • How To Add Planks
    • How To Spawn Objects
  • ❓Support
    • FAQ
    • Door Rotation Issue?
    • Door Customisation
    • System Namespace
    • What Inputs Are Used?
    • Audio ScriptableObjects
    • Variables / Fields Not Appearing in Inspector?
  • 🌀Development
    • Patch Notes - V1.2
    • Roadmap
  • 📧Contact me
    • Contact Me
    • My Other Assets
Powered by GitBook
On this page
  • Mesh collider tip
  • How to spawn objects
  1. Getting Started

How To Spawn Objects

PreviousHow To Add PlanksNextFAQ

Last updated 1 year ago

Mesh collider tip

Make sure the drawer has a mesh collider because you don't want a larger collider (Like a box or sphere collider) blocking the interaction.

How to spawn objects

  • Go to the DoorInteractable script and tick the Spawn Items checkbox at the bottom (This will open the additional parameter for items you can spawn)

  • Create an empty GameObject which will act as your spawn point for the item (This can be inside your drawer

  1. Add the ItemSpawner script to this empty gameobject spawn point

  2. Add the item prefab you want to spawn in the appropriate array

  3. Add the spawn point gameobject to itself as this will be the transform. (I use the additional variable in case you want to spawn via another location)

  • Go back to your DoorInteractable object and add the empty gameobject spawn point to the OnDrawerOpen() event box, then select the ItemSpawner > SpawnItems from the dropdown box

You can add additional items to spawn by clicking the + icon if you wish

⭐