Skip to main content

Create a Return trigger

When a visible object enters a Return trigger, the Pickup is dropped and the object is hidden. Use ReturnObjectExt in the Extension version.

Setup​

  1. Add a GameObject for the Return trigger to the Hierarchy
  2. Add the ReturnObjectExt component
  3. Add a Collider and enable Is Trigger
  4. In Pools, register the GameObject containing the VRCObjectPool that manages the objects to hide
  5. Set Layer to the layer number of the GameObject containing the Return target Collider

Inspector configured with ReturnObjectExt and a Collider

The default Layer is 13, which is VRChat's Pickup layer.

Use a dedicated layer

If a Pickup unrelated to Object Spawn Extension uses the same layer, entering the Return trigger may force that Pickup to Drop and make it impossible to retrieve. Use a layer dedicated to Return targets to prevent unintended reactions.

See Prepare a Pickup for spawning for instructions on creating a dedicated layer.

Scene view showing the Collider area of a Return trigger

Register multiple Pools​

You can register either of the following in Pools.

  • A GameObject containing a VRCObjectPool component
  • A parent GameObject containing multiple child VRCObjectPool components

If you use separate VRCObjectPool components for food, drinks, and other categories, place them under an empty parent GameObject.

ObjectSpawnPools
├─ FoodPool
├─ DrinkPool
└─ DessertPool

In this example, registering ObjectSpawnPools in Pools makes every VRCObjectPool under it a Return target.

Share settings with another ReturnObject​

To use the same Pool settings for multiple Return triggers, assign a configured ReturnObject or ReturnObjectExt to Reference.

When Reference is used, its Pools are searched in addition to the current Pools. If the current Pools is empty, configure Reference.

Test the trigger​

  1. Display an object with a Spawn switch
  2. Place the displayed object in the Return trigger
  3. Confirm that the Pickup is dropped and the object becomes hidden

For an item with a Pickup on a child GameObject, add a helper by following Configure a complex Pickup.

See ReturnObjectExt settings for details about each field.

If needed, continue to Create a Reset switch.