Skip to main content
Version: 2026.7
Still in testing

The SDK of this version is still being tested, and these pages are being updated with it: names, menus and procedures may still change before the release. If you build content for a platform already in production, follow the documentation of that version — pick it from the version menu at the top right.

Item targets

An item target is an object of the scene an item or a tool is used on: the right key in a lock, the wrench on a valve, the helmet in a bin. It is made with the Inventory Item Trigger Detector Placeholder, which says which item it waits for and raises an event when the right item, or a wrong one, reaches it.

The item is a pickable, or a tool held in the hand. The player's inventory is where it comes from.

Inventory Item Trigger Detector Placeholder​

Add it to the object that is the target, and set its collider.

FieldWhat it does
Activation (activation)How a tool in VR activates the target: Contact (default) or Use. See Activation.
Inventory Item (inventoryItem)The pickable the target waits for. Matching is by Item Name. Empty: the target reacts to an empty hand.
Handle Specific Collider PositionWhen on, only one of the item's Interacting Colliders triggers the target, chosen in the field that appears. Off: any of them can.
Detector Collider (detectorCollider)The colliders of the scene that make up the target. They need the Interactable Placeholder.
Feedback Check PositionWhere the check or cross appears. Empty: on the target.

Events​

EventWhen it fires
On Item Trigger EnterThe expected item, or tool, reaches the target.
On Wrong Item Trigger EnterAnother item or tool reaches the target.
On Item Trigger ExitThe item leaves the target (VR contact).

In a multiplayer session the detector's events are raised on every client of the room, also when another player's item reached the target. LastActionByLocalPlayer, on the placeholder, tells whose it was: the application sets it before each event, and it is true when this client's player acted. Read it in a handler of the events above. The Item On Target element uses it for its Completed By setting.

The application shows a check at the target when the right item reaches it and a cross when a wrong one does, unless an Item On Target element reports this target: the element's cue and the procedure show the feedback then, so there is not a second one.

How an item reaches a target​

PlatformThe itemThe tool
Desktop, web, mobileThe player drags the item from the inventory (or from the scene, before picking it up) and releases it on the target.The player clicks or taps the target with the tool in hand.
VRThe player brings the item to the target: a copy taken out of the inventory, or an object carried from the scene. The target reacts to the physical contact, so one of the two colliders must be a trigger.The tool in hand touches the target. See Activation.

The right item raises On Item Trigger Enter and spends one use; when its last use is spent, it leaves (the copy in VR is destroyed, as if thrown in the bin). A wrong item raises On Wrong Item Trigger Enter and spends nothing.

One object can carry several detectors, for example a bin with one detector per accepted item. A wrong item shows the cross only if no detector on the same collider accepts it.

Activation​

Activation matters for tools in VR with the Inventory Placeholder:

ActivationThe target reacts when
Contact (default)The right tool touches it: its events and the check or cross, with no use spent. This is how targets worked before 2026.7.
UseThe tool that touches it is used: the trigger of the hand that holds it. A Hold tool, like a spray, keeps acting while the trigger is held.

On desktop, web and mobile the click with the tool is the use, for both. In VR with the earlier Tool Inventory Placeholder, a target reacts on contact whatever Activation says.

A tool with a number of uses (see Tools) spends one only on a target it reaches with a use: on desktop and mobile, a target under the pointer that expects this tool; in VR, a target with Use activation that expects it and that the tool touches. A Contact target never spends the tool's uses. Give a target Use activation when a counted tool must spend its uses on it.

Targets that refuse items​

A target refuses items while it takes none: an Item On Target element refuses while its task is completed, failed or locked, and takes items while the task is to do or in progress. A target without an element always takes items.

A refused item is not used: it keeps its use and stays in the inventory, and neither the right nor the wrong events fire and no check or cross shows. This holds for an item dragged from the inventory, for a click with a tool, for a VR contact and for a tool's use. For a tool with counted uses it means that a key used again on a door already open does not lose a use, and a later task cannot become impossible.

Known limits​

  • A target refuses items only through an Item On Target element: a creator's script cannot make a plain Inventory Item Trigger Detector refuse items.
  • In VR a target is detected by the physical contact of colliders, as Unity's trigger events do: a detector collider that is not a trigger, touched by an item collider that is not a trigger either, raises nothing.