Pickups
Scripts to control pickups.
Local Object Respawn
Respawn a local object, sending it back to its original position. Can be used by Interacting with it if a Collider is attached or by calling _Respawn() from a UI component or another script.
- objectToRespawn : GameObject - The GameObject to respawn.
- respawnPoint : Transform - (Optional) The Transform to respawn the object to. If none is assigned, it will respawn to its original position.
Respawn Pickups
Respawns one or more synced objects. Can be used by Interacting with it if a Collider is attached or by calling _RespawnPickups() from a UI component or another script.
- Objects : VRCObjectSync[] - List of VRCObjectSync components to respawn.
- RespawnHeldItems : bool - If true, will also respawn items currently held by players.
Pickup Invoke
Used to send UdonEvents when a player uses the attached pickup.
- Target-MethodPairs - List of UdonBehaviours along with the name of the event that will be triggered.
Pickup Reset Zone
Drops and respawns any held synced pickups when a player enters the trigger collider. Can be used by attaching a Collider with "Is Trigger" enabled.
- Objects : VRCObjectSync[] - (Optional) List of VRCObjectSync components to respawn. If none are assigned, it will respawn all held synced pickups by the player entering the trigger.