Skip to main content

Create a Spawn switch

A Spawn switch displays objects registered in VRCObjectPool one at a time. Use SpawnObjectExt in the Extension version.

Setup​

  1. Add a GameObject for the switch to the Hierarchy
  2. Add a Collider for Interact detection
  3. Add the SpawnObjectExt component
  4. In VRC Object Pool, assign the GameObject containing the VRCObjectPool you created
  5. Set the destination mode to 単一 (Single)
  6. Configure Spawn Point if needed

SpawnObjectExt configured with a single spawn destination

When a player Interacts with the switch, objects in the Pool are displayed in sequence.

Spawn position​

Create a GameObject that represents the spawn position, then assign its Transform to Spawn Point. Both position and rotation are applied.

Scene view showing the Spawn Point position and orientation

Enable Move Item To Hand to move the item to whichever hand is closer to the switch. In this case, Spawn Point is not used.

After confirming the basic behavior, see Configure multiple spawn points to use more than one destination.

To adjust the spawn height or orientation for each item, see Adjust position and rotation when spawning.

Test the switch​

  1. Start the world
  2. Interact with the Spawn switch
  3. Confirm that one object from the Pool appears
  4. If Spawn Point or Move Item To Hand is configured, confirm that the object moves to the expected position

See SpawnObjectExt settings for details about each field.

After confirming the behavior, continue to Create a Return trigger.