Setup Wizard
Tools > All In One Interaction Kit > Setup Wizard, or right-click a prefab in the Project window > All In One Interaction Kit > Make Interactive Door.
The wizard never edits your prefab or model. It saves a new prefab next to it (<Name>_Interactive.prefab) that
contains your original as a nested prefab, so later changes to your original still show up.
Picking your prefab #
Any of these works:
- click a prefab in the Project window while the wizard is open: it picks it up straight away;
- drag it onto the Prefab field, or use the field's circle to browse;
- select an instance of it in your scene (Hierarchy or Scene view) and press Use selected: the wizard uses the prefab it comes from;
- a scene object that isn't a prefab yet: press Save as prefab and use it.
The preview #
With Preview in Scene view on, a copy of your prefab appears where the Scene view is looking. For every moving part it shows:
- a yellow box around the part;
- hinged parts: the hinge line, and an arc for how far it opens and which way (blue: outward, orange: the other way for doors that open either way), with a label such as Door: left hinge, opens 100°, outward;
- drawers: an arrow and an outline where the drawer ends up, labelled with how far it slides.
Change a value in the wizard and the preview follows. The copy is never saved with your scene and goes when the wizard closes.
Models with moving parts #
The wizard finds a model's moving parts:
- by name: child objects named like door, lid, hatch, gate, flap, drawer or tray;
- by shape, when nothing is named like that (children called Cube, Cube (1)...): thin panels on the front of the model become doors, boxes set into the front become drawers. Handles and knobs are too small to count, and the biggest piece is the body. These are marked guessed from its shape: check them in the preview.
Not right? Change a part's type, remove it (x), or add one: click a part of the preview in the Scene view or the Hierarchy (or pick it from the Part list under Add a part), choose what it is, and press Add part.
| Setting | What it does |
|---|---|
| Tick box | Untick a part to leave it alone. x removes it from the list. Show selects it in the preview. |
| Type | Door swings on its side; Drawer slides straight out; Lid lifts at the front on a hinge along its back edge (chests, hatches); Flap folds down at the front on a hinge along its bottom edge (oven doors, drop-front desks); Button pushes in and springs back; Lever tilts forward around its base. Buttons and levers can power things. |
| Hinge side | Doors: which edge the hinge is on, seen from the front. The wizard guesses it from where the part's pivot is. |
| Opens (degrees) | Doors, lids, flaps and levers: how far it opens. |
| Slides out (m) | Drawers: how far it slides out (it starts at three quarters of the drawer's depth). |
| Swing | Doors: Outward Only (out of the front, right for furniture), Inward Only, or Away From Player (either way, always away from whoever opens or pushes it, for doors you walk through). |
| Motion | Doors: Tween (smooth, scripted) or Physics (a real hinge you can push). |
What it sets up for you:
- each part gets its own Interactable and Hinge, Slide or Switch, so a cabinet with a door and a drawer has two;
- the front of the model is found automatically (the side the part sits on), so doors swing out of the front and drawers slide out of it;
- parts turn around their edge even when the part's pivot is in the middle (the Hinge's Hinge Point);
- colliders are added if the model has none: mesh colliders for the body, box colliders for the parts.
Gives loot adds a Loot Container to the first part, so opening it hands out items (see Containers and loot).
Single objects #
A prefab without moving parts becomes what you pick as Type:
- Door: swings on a hinge (below);
- Switch: on/off; Button: springs back after a press; Lever: tilts forward around its base. All three can power things (see Power and puzzles);
- Pressure Plate: powers things while weight stands on it; the detection box covers the model and half a metre above;
- Container: a crate to search for loot;
- Carryable, Inspectable, Readable, Keypad, Item Socket: see Carry, sockets, inspect, notes and keypads.
Single doors #
For a door, the wizard measures where the pivot is:
- pivot in the middle (common for store models): it adds a hinge pivot on the edge you choose;
- pivot already on an edge: it still wraps the door so your original stays untouched.
Pick the Hinge side, Opens (degrees), Swing and Motion, then Create Interactive Prefab. Doors default to Away From Player: they open away from whoever opens them, from either side.
After creating #
Drag the prefab into a scene and select the door: the Hinge inspector has a Preview slider and Closed, Open and Other way buttons, and the Scene view shows the arcs and a handle you can drag to set the open angle. Nothing in the preview is saved.
Tips #
- Name your parts clearly in your 3D app (door, drawer): the wizard finds them by name. Unnamed parts are guessed from their shape, and you can always add or change parts by clicking them.
- To make a door open one way only, set Swing on its Hinge to Outward Only or Inward Only.
- Physics doors ignore collisions with the rest of their own model (the frame or cabinet body) so they never jam.