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
- Add
HGSpawnHelperto the root GameObject of the entire item - At the top of the Inspector, select
v7.x.xorv8.x.xto match the item you use - Click
AUTO SETto automatically assign the required references from the root hierarchy - Confirm that the references are assigned and that the Inspector displays no errors
- Register the same root GameObject in the
Poolarray ofVRCObjectPool - Adjust
Move Delayif needed - Match the layer used by the child Pickup with
LayeronReturnObjectExt
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
VRCObjectSynctoHG Base - Leave
HG Syncunassigned - Confirm that the root GameObject containing
HGSpawnHelperalso containsResetSwitchHelper
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
VRCObjectSyncused for movement toHG Sync
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.
HGSBaseHGSTablewareHGSDish
An item containing only HGSCore* does not match the supported Return targets.
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
- Spawn the item and confirm that the entire structure moves to the destination
- Use it as a Pickup and confirm that its edible-item behavior works correctly
- Place the child Pickup in the Return trigger
- Confirm that the entire item becomes hidden
- Spawn it again and confirm that its behavior has returned to the initial state
Test with two clients when checking ownership and position synchronization.