Skip to content

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.

A tooltip displayed when hovering over the interactable.

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).

UnityEvent. Fire when a player sits in or leaves a seat produced by the Sit At Position action.

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 is OnInteractDown, OnInteractUp, OnInputDown, or OnInputUp.
  • AnimEventCustomTrigger(AnimationEvent) — routes to CustomTrigger(context) when the animation event’s source matches the interactable.
  • CustomTrigger() / CustomTrigger(int index) / CustomTrigger(InteractionContext, [int]) — fire OnCustomTrigger actions (all, or by index).
  • CancelAllDelays() / CancelDelayAtIndex(int) — cancel pending delayed action jobs.

The list of triggers configured for this interactable.

Every trigger has a type that decides how and when it fires.

Properties that apply to every trigger 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 in seconds before the action is executed.

Triggered when a player grabs the object.

Triggered when a player drops the object.

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.

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.

Another collider (with Is Trigger set) enters the interactable’s collider.

Layer The triggering object must be on one of the selected layers.

Another collider (with Is Trigger set) leaves the interactable’s collider.

Layer The triggering object must be on one of the selected layers.

Another collider (without Is Trigger) enters the interactable’s collider.

Layer The triggering object must be on one of the selected layers.

Another collider (without Is Trigger) leaves the interactable’s collider.

Layer The triggering object must be on one of the selected layers.

Triggered when the GameObject is enabled.

Triggered when the GameObject is disabled.

Simple scheduler for actions.

Seconds Duration in seconds.

Mode

  • Once On Enable Action runs once after the configured seconds.
  • Repeat Action runs every x seconds repeatedly.
  • Deactivate Self Action runs once and then the GameObject deactivates itself.

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.

Triggered whenever the selected CVR Variable Buffer changes.

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, or 1.0).
  • Buffer -> Buffer: Select a second CVR Variable Buffer.

Fires on cron jobs. See the Cron article on Wikipedia for syntax.

Cron String A valid cron string.

Triggered when a player’s pointer enters the trigger.

Triggered when a player’s pointer exits the trigger.

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.

Same as On Input Down, but fires when the input is released.

Fires when a player looks at the object.

Fires when a player looks away after previously triggering On Gaze Enter.

Like triggers, actions have a type.

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.

Sets the active state of a GameObject.

State

  • Enable Enables the GameObject.
  • Disable Disables the GameObject.
  • Toggle Toggles the GameObject.

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 true or false.
  • Int Whole number (for example 5).

Fires an animator Trigger parameter.

Trigger name Animator parameter name.

Instantiates objects such as prefabs.

Object Prefab or object to instantiate.

Target Location Parent GameObject and position origin for the spawned object.

Teleports a player to a target transform.

Target Location Target transform. Scale is ignored.

Teleports a GameObject to a target transform.

Object Object to teleport.

Target Location Target transform. Rotation and scale are ignored.

Toggles an animator Bool parameter.

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.

Sets a float or int parameter from a CVR Variable Buffer.

Value Select a CVR Variable Buffer.

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
  • ÷ Division
  • mod Modulo
  • pow Power
  • log Logarithm

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.

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.

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.

Calls a public method of a component.

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.

Plays an audio source.

AudioSource The audio source to play.

Stops an audio source.

AudioSource The audio source to stop.

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.

CVR-GameFiles/ABI.CCK.Components/CVRInteractable.cs, CVR-GameFiles/ABI.CCK.Components/CVRInteractableAction.cs, CVR-GameFiles/ABI.CCK.Components/CVRInteractableActionOperation.cs