CVR Interactable
The CVR Interactable binds triggers (input events) to actions (state changes, spawns, teleports, and more). Each interactable can carry several triggers, and each trigger runs one or more configured actions. The runtime implementation derives from Interactable and implements IStateMachineCallbackReceiver so animator state machines can drive it via CVR Animator Driver.
Top-level fields
Section titled “Top-level fields”Tooltip
Section titled “Tooltip”A tooltip displayed when hovering over the interactable.
Version
Section titled “Version”int. Schema version; current LATEST_VERSION = 1. Older schemas are upgraded in HandleVersioning — in particular, OnInteractDown/OnInteractUp / OnPointerEnter/OnPointerExit are rewritten to OnUnityUIPointerDown/Up/Enter/Exit when the object has a RectTransform but no Collider (UI-only mode).
On Enter Seat / On Exit Seat
Section titled “On Enter Seat / On Exit Seat”UnityEvent. Fire when a player sits in or leaves a seat produced by the Sit At Position action.
Runtime state
Section titled “Runtime state”These properties are writable by the interactable runtime only:
IsLookedAt— true while the gaze pointer is hovering.IsHeld— true while the interactable is grabbed.IsAttached— true while attached to a player.IsSitting— true while a player is seated in this interactable.IsInteractable— computed; true when any action isOnInteractDown,OnInteractUp,OnInputDown, orOnInputUp.
Anim events
Section titled “Anim events”AnimEventCustomTrigger(AnimationEvent)— routes toCustomTrigger(context)when the animation event’s source matches the interactable.
CustomTrigger()/CustomTrigger(int index)/CustomTrigger(InteractionContext, [int])— fireOnCustomTriggeractions (all, or by index).CancelAllDelays()/CancelDelayAtIndex(int)— cancel pending delayed action jobs.
Triggers
Section titled “Triggers”The list of triggers configured for this interactable.
Trigger
Section titled “Trigger”Every trigger has a type that decides how and when it fires.
General Properties
Section titled “General Properties”Properties that apply to every trigger type.
Broadcast Type
Section titled “Broadcast Type”Controls how the triggered action is networked to other players in the instance.
- Local Not Networked Execution is local only and not networked.
- Global Networked Execution is networked to all other players in the instance.
- Global Instance Owner Only Same as Global Networked, but only the current instance owner can trigger it.
- Global Networked All Instance Moderators Same as Global Networked, but only instance moderators can trigger it.
Delay (Seconds)
Section titled “Delay (Seconds)”Delay in seconds before the action is executed.
On Grab
Section titled “On Grab”Triggered when a player grabs the object.
On Drop
Section titled “On Drop”Triggered when a player drops the object.
On Interact Down
Section titled “On Interact Down”A player interacts with the object, for example by pointing at it and pressing Left Click.
Distance Maximum distance a player can stand from the object while still interacting.
On Interact Up
Section titled “On Interact Up”Triggered when the interact input is released (for example, releasing Left Click).
Distance Maximum distance a player can stand from the object while still interacting.
On Enter Trigger
Section titled “On Enter Trigger”Another collider (with Is Trigger set) enters the interactable’s collider.
Layer The triggering object must be on one of the selected layers.
On Exit Trigger
Section titled “On Exit Trigger”Another collider (with Is Trigger set) leaves the interactable’s collider.
Layer The triggering object must be on one of the selected layers.
On Enter Collider
Section titled “On Enter Collider”Another collider (without Is Trigger) enters the interactable’s collider.
Layer The triggering object must be on one of the selected layers.
On Exit Collider
Section titled “On Exit Collider”Another collider (without Is Trigger) leaves the interactable’s collider.
Layer The triggering object must be on one of the selected layers.
On Enable
Section titled “On Enable”Triggered when the GameObject is enabled.
On Disable
Section titled “On Disable”Triggered when the GameObject is disabled.
On Timer
Section titled “On Timer”Simple scheduler for actions.
Seconds Duration in seconds.
Mode
- Once On Enable Action runs once after the configured seconds.
- Repeat
Action runs every
xseconds repeatedly. - Deactivate Self Action runs once and then the GameObject deactivates itself.
On Particle Hit
Section titled “On Particle Hit”Triggered when a particle hits the trigger collider. The particle system must have collision enabled and set to world.
Specific Particle Systems Optional list of particle systems that can trigger the action. Leaving this empty allows any particle system.
On Variable Buffer Update
Section titled “On Variable Buffer Update”Triggered whenever the selected CVR Variable Buffer changes.
On Variable Buffer Comparison
Section titled “On Variable Buffer Comparison”Type Select how to compare the variable.
- Buffer -> Static Compare the buffer value to a static value (Value 2).
- Buffer -> Buffer Compare the buffer value to another buffer’s value (Value 2).
Value 1 First variable. Select a CVR Variable Buffer.
Comparator Comparison operator:
==Equal to>=Greater than or equal to>Greater than<Less than<=Less than or equal to!=Not equal to
Value 2 Second value.
- Buffer -> Static: Enter a float (for example,
13.37,1, or1.0). - Buffer -> Buffer: Select a second CVR Variable Buffer.
On Cron
Section titled “On Cron”Fires on cron jobs. See the Cron article on Wikipedia for syntax.
Cron String A valid cron string.
On Pointer Enter
Section titled “On Pointer Enter”Triggered when a player’s pointer enters the trigger.
On Pointer Exit
Section titled “On Pointer Exit”Triggered when a player’s pointer exits the trigger.
On World Trigger
Section titled “On World Trigger”On Custom Trigger
Section titled “On Custom Trigger”On Input Down
Section titled “On Input Down”Listens for custom user inputs.
Interaction Filter
- Global Always trigger when input is received.
- Looking Only trigger while looking at the object.
- Attached Only trigger while the object is attached to the player.
- Held Only trigger while held in hand.
- Sitting Only trigger while sitting in a chair of the interactable.
Interaction Input The input required for the action.
Interaction Input Modifier Additional keys required.
On Input Up
Section titled “On Input Up”Same as On Input Down, but fires when the input is released.
On Gaze Enter
Section titled “On Gaze Enter”Fires when a player looks at the object.
On Gaze Exit
Section titled “On Gaze Exit”Fires when a player looks away after previously triggering On Gaze Enter.
Actions
Section titled “Actions”Like triggers, actions have a type.
Common Properties
Section titled “Common Properties”Target GameObject to modify. Actions targeting an animator need an Animator component on this GameObject.
Parameter Name Animator parameter to modify. Enter the parameter name.
Set Game Object Active
Section titled “Set Game Object Active”Sets the active state of a GameObject.
State
- Enable Enables the GameObject.
- Disable Disables the GameObject.
- Toggle Toggles the GameObject.
Set Animator Float/Bool/Int Value
Section titled “Set Animator Float/Bool/Int Value”Sets an animator parameter to a value.
Value Target value. The type depends on the selected Action Type:
- Float Decimal number (for example
13.37). - Bool
trueorfalse. - Int Whole number (for example
5).
Trigger Animator Trigger
Section titled “Trigger Animator Trigger”Fires an animator Trigger parameter.
Trigger name Animator parameter name.
Spawn Object
Section titled “Spawn Object”Instantiates objects such as prefabs.
Object Prefab or object to instantiate.
Target Location Parent GameObject and position origin for the spawned object.
Teleport Player
Section titled “Teleport Player”Teleports a player to a target transform.
Target Location Target transform. Scale is ignored.
Teleport Object
Section titled “Teleport Object”Teleports a GameObject to a target transform.
Object Object to teleport.
Target Location Target transform. Rotation and scale are ignored.
Toggle Animator Bool Value
Section titled “Toggle Animator Bool Value”Toggles an animator Bool parameter.
Set Animator Float/Int/Bool Random
Section titled “Set Animator Float/Int/Bool Random”Randomly sets an animator parameter.
Parameter Name Parameter to modify.
Min Minimum value.
Max Maximum value.
Chance (0-1)
Chance for a bool parameter to be set to true. Clamped to 0 - 1.
Set Animator Float/Int By Var
Section titled “Set Animator Float/Int By Var”Sets a float or int parameter from a CVR Variable Buffer.
Value Select a CVR Variable Buffer.
Variable Buffer Arithmetic
Section titled “Variable Buffer Arithmetic”Modifies a CVR Variable Buffer value.
Type
- Buffer -> Static Use a static Value 2.
- Buffer -> Buffer Use another buffer’s value as Value 2.
- Buffer -> Random Use a random Value 2.
Value 1 The buffer used for the operation.
Operator
+Addition-Subtraction*Multiplication÷DivisionmodModulopowPowerlogLogarithm
Value 2 Second operand. Depends on the selected type:
- Buffer -> Static: A float number.
- Buffer -> Buffer: Select a second CVR Variable Buffer.
- Buffer -> Random: A minimum and maximum for the random value.
Result Select a CVR Variable Buffer to receive the result.
Display World/Avatar/Instance Detail Page
Section titled “Display World/Avatar/Instance Detail Page”Opens the details page of a world, avatar, or instance.
World/Avatar GUID Asset GUID. See CVR Asset Info.
Instance GUID A valid instance GUID.
Sit At Position
Section titled “Sit At Position”Sets up a sit target such as a chair.
Sitting Location
Origin of the sitting animation (position 0, 0, 0 for the animation).
Exit Location Transform the player teleports to when leaving the sit state.
Overwrite Animation Optional animation to replace the default sitting animation.
Method Call
Section titled “Method Call”Calls a public method of a component.
Set Spawnable Value
Section titled “Set Spawnable Value”Sets a synced value on a spawnable. The interactable must be on the root or in a child of the spawnable’s hierarchy.
Parameter Parameter to modify.
Value Value to apply.
Update Method
- Override Sets the value directly.
- Add Adds to the spawnable’s value.
- Subtract Subtracts from the spawnable’s value.
- Toggle Toggles bool-style values between two states.
Play Audio
Section titled “Play Audio”Plays an audio source.
AudioSource The audio source to play.
Stop Audio
Section titled “Stop Audio”Stops an audio source.
AudioSource The audio source to stop.
Set Property By Value
Section titled “Set Property By Value”Sets a property on a component to a value from a CVR Variable Buffer.
Variable Buffer Buffer used as the source value.
Target GameObject containing the component.
Component Component on the target. Lists all components on the GameObject.
Property Public property on the component.
Related
Section titled “Related”Source
Section titled “Source”CVR-GameFiles/ABI.CCK.Components/CVRInteractable.cs, CVR-GameFiles/ABI.CCK.Components/CVRInteractableAction.cs, CVR-GameFiles/ABI.CCK.Components/CVRInteractableActionOperation.cs