ST Pickup
Lets players pick up an object in VR and on desktop. Its position is synced for everyone, and the holder becomes
the owner, so scripts on the object can change synced values while it is held. (In VRChat terms: VRC_Pickup and
VRC_ObjectSync in one.)
Add it with Add Component → StageTime → ST Pickup. The object needs a collider.
| Field | |
|---|---|
pickupable | Players can pick it up |
DisallowTheft | Others cannot take it out of the holder's hand |
InteractionText | Shown when a player points at it |
UseText | Shown while held, for the use button. Empty = no use action |
Scripts on the same GameObject get OnPickup, OnDrop, OnPickupUseDown and OnPickupUseUp
(Events). From scripts:
STPickup pickup = GetComponent<STPickup>();
if (pickup.IsHeld) Debug.Log($"Held by {pickup.currentPlayer.displayName}");
pickup.Drop(); // makes the local holder drop it
The Pickup colour example changes colour each time the holder presses use.
How it works
ST Pickup is the same setup as StageTime's own synced props (the guitar and microphones in the main venue): an XR grab interactable, a synced transform and a hover outline, configured for you.