Skip to main content

Configure an item made by henoGohan

HGSpawnHelper is a dedicated helper component for using edible items made by henoGohan with Object Spawn Extension. It supports the v7.x.x and v8.x.x series.

Setup​

  1. Add HGSpawnHelper to the root GameObject of the entire item
  2. At the top of the Inspector, select v7.x.x or v8.x.x to match the item you use
  3. Click AUTO SET to automatically assign the required references from the root hierarchy
  4. Confirm that the references are assigned and that the Inspector displays no errors
  5. Register the same root GameObject in the Pool array of VRCObjectPool
  6. Adjust Move Delay if needed
  7. Match the layer used by the child Pickup with Layer on ReturnObjectExt

AUTO SET assigns the GameObject containing the corresponding Base script to HG Base. When v7.x.x is selected, it also assigns HG Sync. If automatic setup cannot find the references, check the version-specific requirements below and assign them manually.

Configure a v8.x.x item​

  • Select v8.x.x
  • Assign the GameObject containing both the corresponding Base script and VRCObjectSync to HG Base
  • Leave HG Sync unassigned
  • Confirm that the root GameObject containing HGSpawnHelper also contains ResetSwitchHelper
Required components for v8.x.x

The item cannot be moved if HG Base does not contain VRCObjectSync. The gimmick cannot be reset on Return if the root GameObject does not contain ResetSwitchHelper.

Configure a v7.x.x item​

  • Select v7.x.x
  • Assign the GameObject containing the corresponding Base script to HG Base
  • Assign the GameObject containing the VRCObjectSync used for movement to HG Sync
Required references for v7.x.x

The item cannot be moved if HG Base or HG Sync is unassigned, or if HG Sync does not contain VRCObjectSync.

Among the UdonSharpBehaviour components directly attached to HG Base, the helper searches in order for a type name containing one of the following strings.

  • HGSBase
  • HGSTableware
  • HGSDish

An item containing only HGSCore* does not match the supported Return targets.

If you use a v7.x.x henoGohan item

When you update Object Spawn Extension in a Unity project that already contains a configured v7.x.x henoGohan gimmick item, the extension detects the assigned HG Sync and automatically preserves the helper as a v7.x.x configuration. Normally, you do not need to select the version again or reassign its references after updating.

After updating, confirm that v7.x.x is selected on HGSpawnHelper and that the existing HG Base and HG Sync references are preserved. If HG Sync was not assigned before migration, the helper is not automatically identified as a v7.x.x configuration.

Behavior during Spawn and Return​

On Spawn, the entire item structure moves to the player's hand or the configured destination according to SpawnObjectExt.

HG Base is also a search target for SpawnOffset or an ObonEasy TrayItem component. To adjust the spawn position and orientation, see Adjust position and rotation when spawning.

On Return, the reset event for the henoGohan item is sent to all clients immediately before the root registered in the Pool becomes hidden. The v8.x.x series uses Respawn on ResetSwitchHelper, while the v7.x.x series uses State7_Reset on the Base script.

Test the behavior​

  1. Spawn the item and confirm that the entire structure moves to the destination
  2. Use it as a Pickup and confirm that its edible-item behavior works correctly
  3. Place the child Pickup in the Return trigger
  4. Confirm that the entire item becomes hidden
  5. Spawn it again and confirm that its behavior has returned to the initial state

Test with two clients when checking ownership and position synchronization.