Skip to main content

1. Overview

Actions are the fundamental building blocks of VRse Studio experiences. They define what happens in your VR world - from moving objects and playing sounds to updating user interfaces and controlling player behavior. This comprehensive reference covers all available actions and their implementation based on the current VRse Studio codebase.

2. Understanding Actions

2.1 What Are Actions?

Actions are executable instructions that define specific behaviors in your VR experience. Each action performs a discrete task such as:
  • Manipulating objects in the 3D environment
  • Playing audio or visual media
  • Updating user interface elements
  • Controlling player movement and interactions
  • Managing game logic and flow

2.2 Action Structure

Every action follows a consistent JSON structure:
{
  "Name": "ActionName",
  "Query": "TargetObjectName", 
  "Option": "SpecificOperation",
  "Data": "{\"parameter\":\"value\"}",
  "Type": 0
}
Components:
  • Name: The action type identifier
  • Query: Target object name (when applicable)
  • Option: Specific operation within the action type
  • Data: JSON string containing parameters
  • Type: Legacy field (currently unused, reserved for future functionality)
Note: The Type field is currently not used in the system and has no functionality. It is maintained for backward compatibility and may be utilized for future features. Always set this to 0 for actions.

2.3 Common Parameters

Most actions support these universal parameters:
  • waitForCompletion: Boolean indicating whether to wait for action completion before proceeding
  • targetTransform: Reference to target position/rotation object
  • duration: Time-based parameter for timed operations
  • lerpSpeed: Animation speed for transform operations

3. Action Types

Actions are organized into several categories based on their functionality:
CategoryPurposeExamples
Object ManipulationControl 3D objectsMove, scale, animate, spawn/despawn
Media & AudioHandle multimedia contentVoice-over, SFX, videos, images
User InterfaceManage UI elementsUpdate text, reposition panels, notifications
Player ControlManage user experienceTeleport, camera effects, movement
Interactive ComponentsControl VR interactionsHighlighting, animations, physics
Meta LayerAdvanced visual effectsOutlines, labels, arrows
SpecializedDomain-specific featuresHaptics, evaluation tools, checklists

4. Object Manipulation Actions

4.1 ObjectAction (Objects)

Controls basic object properties and transformations with enhanced animation capabilities.

Options

OptionDescription
SpawnEnable an item (SetActive = true)
DespawnDisable the item (SetActive = false)
SetComponentPropertyModify IGrabbableWrapper properties
ChangePositionInstantly move object to target transform
AnimatePositionSmoothly animate object to target position
AnimateScaleSmoothly animate object scale
AnimatePositionAndScaleAnimate both position and scale simultaneously

Parameters

ParameterTypeDescription
waitForCompletionBooleanWait for action completion
lerpSpeedFloatAnimation transition speed (default: 0.5f)
componentStringComponent name for property modification
propertyStringProperty name to modify
propertyValueBooleanNew property value
targetTransformStringTarget transform reference
isAnimatedBooleanWhether to use animation

Example Usage

{
  "Name": "Objects",
  "Query": "Cube.001",
  "Option": "AnimatePosition",
  "Data": "{\"waitForCompletion\":true,\"lerpSpeed\":2.5,\"targetTransform\":\"targetPos\"}",
  "Type": 0
}

4.2 ObjectAnimationAction

Advanced object animation with precise control over position, rotation, and scale.

Options

OptionDescription
PositionAnimate position only
RotationAnimate rotation only
ScaleAnimate scale only
PositionRotationAnimate position and rotation
PositionScaleAnimate position and scale
RotationScaleAnimate rotation and scale
PositionRotationScaleAnimate all transform properties

Parameters

ParameterTypeDescription
targetTransformStringTarget transform reference
lerpSpeedFloatAnimation speed (default: 1.0f)
waitForCompletionBooleanWait for animation completion

Example Usage

{
  "Name": "ObjectAnimation",
  "Query": "GameObject",
  "Option": "PositionRotation",
  "Data": "{\"targetTransform\":\"TargetPos\",\"lerpSpeed\":1.5,\"waitForCompletion\":true}",
  "Type": 0
}

5. Media and Audio Actions

5.1 VoiceOver Action

Converts text to speech with advanced localization and caching support.

Options

OptionDescription
PlayPlay text-to-speech audio
PausePause ongoing voiceover
StopAndSkipStop ongoing voiceover

Parameters

ParameterTypeDescription
textStringText to be converted to speech
waitForCompletionBooleanWait for audio completion

Example Usage

{
  "Name": "VoiceOver",
  "Query": "",
  "Option": "Play",
  "Data": "{\"text\":\"Welcome to the VR experience\",\"waitForCompletion\":true}",
  "Type": 0
}

5.2 SFXPlayerAction

Enhanced sound effects management with cloud audio support.

Options

OptionDescription
PlayPlay the specified audio clip
PausePause current audio
PlayLoopLoop the audio clip continuously
StopAndSkipStop and skip current audio

Parameters

ParameterTypeDescription
audioClipNameStringName of audio clip in Resources folder
useCloudAudioBooleanWhether to use cloud-based audio
audioUrlStringURL for cloud audio (when useCloudAudio = true)
audioRangeFloatAudio hearing distance
setVolumeFloatVolume level (0.0 to 1.0)

Example Usage

{
  "Name": "SFXPlayer",
  "Query": "AudioSource",
  "Option": "Play",
  "Data": "{\"waitForCompletion\":true,\"audioClipName\":\"ButtonClick\",\"audioRange\":5.0,\"setVolume\":0.8}",
  "Type": 0
}

5.3 TextMediaAction

Controls text content display using MultiMediaPlayer component.

Options

OptionDescription
EnableDisplay text content
DisableHide text content

Parameters

ParameterTypeDescription
contentStringText content to display
waitForCompletionBooleanWait for action completion

Example Usage

{
  "Name": "TextMediaAction",
  "Query": "TextPanel",
  "Option": "Enable",
  "Data": "{\"content\":\"Instructions: Complete the task\",\"waitForCompletion\":false}",
  "Type": 0
}

5.4 ImageMediaAction

Controls image content display using MultiMediaPlayer component.

Options

OptionDescription
EnableDisplay image content
DisableHide image content

Parameters

ParameterTypeDescription
contentStringImage path in Resources folder
waitForCompletionBooleanWait for action completion

Example Usage

{
  "Name": "ImageMediaAction",
  "Query": "ImagePanel",
  "Option": "Enable",
  "Data": "{\"content\":\"Images/Diagram\",\"waitForCompletion\":false}",
  "Type": 0
}

5.5 VideoMediaAction

Controls video content display with completion tracking.

Options

OptionDescription
EnableDisplay and play video content
DisableStop and hide video content

Parameters

ParameterTypeDescription
contentStringVideo path in Resources folder
waitForCompletionBooleanWait for video completion

Example Usage

{
  "Name": "VideoMediaAction",
  "Query": "VideoPanel",
  "Option": "Enable",
  "Data": "{\"content\":\"Videos/Tutorial\",\"waitForCompletion\":true}",
  "Type": 0
}

6. User Interface Actions

6.1 UIUpdateAction

Updates Experience Panel interface elements with enhanced positioning.

Options

OptionDescription
UpdateDescriptionChange Experience Panel description
UpdateUIPositionMove UI to target position

Parameters

ParameterTypeDescription
textDescriptionStringNew description text
targetTransformStringTarget position for UI

Example Usage

{
  "Name": "UIUpdate",
  "Query": "",
  "Option": "UpdateDescription",
  "Data": "{\"textDescription\":\"Step 2: Grab the tool\",\"waitForCompletion\":false}",
  "Type": 0
}

6.2 ToastMessageAction

Displays temporary notification messages with type-based styling.

Parameters

ParameterTypeDescription
messageStringMessage text to display
messageTypeString”Default”, “Wrong”, or “Correct”
durationFloatDisplay duration in seconds

Example Usage

{
  "Name": "ToastMessage",
  "Query": "",
  "Option": "",
  "Data": "{\"message\":\"Task completed successfully!\",\"messageType\":\"Correct\",\"duration\":3.0}",
  "Type": 0
}

6.3 ChecklistUIAction

Advanced checklist management with move-to-next functionality.

Options

OptionDescription
CheckCheck the toggle
UncheckUncheck the toggle
CurrentSet toggle as current
ConfigurePopulate checklist with title and toggles

Parameters

ParameterTypeDescription
indexIntegerToggle index (starting from 1)
titleTextStringChecklist title (Configure option only)
toggleInfosString ArrayArray of toggle text labels
moveToNextBooleanAuto-advance to next item after checking

Example Usage

{
  "Name": "ChecklistUIToggle",
  "Query": "ChecklistUI",
  "Option": "Check",
  "Data": "{\"index\":1,\"moveToNext\":true,\"waitForCompletion\":false}",
  "Type": 0
}

6.4 MCQResponseAction

Multiple-choice question evaluation with multi-answer support.

Parameters

ParameterTypeDescription
questionIndexIntegerQuestion number
questionTextStringQuestion content
optionsListString ArrayAnswer options
correctOptionIndexInteger ArrayCorrect answer indices (0-based)
showAnswerDurationFloatTime to display answer

Example Usage

{
  "Name": "MCQResponseAction",
  "Query": "MCQ_Panel",
  "Option": "",
  "Data": "{\"questionIndex\":1,\"questionText\":\"What is 2+2?\",\"optionsList\":[\"3\",\"4\",\"5\"],\"correctOptionIndex\":[1],\"showAnswerDuration\":3}",
  "Type": 0
}

7. Player Control Actions

7.1 PlayerAction

Enhanced player control with improved fade and movement systems.

Options

OptionDescription
TeleportMove player to target position
LockMovementDisable player movement
UnlockMovementEnable player movement
CameraFadeApply camera fade effects

Parameters

ParameterTypeDescription
targetTransformStringTarget position for teleport
shouldFadeBooleanWhether to fade during teleport
fadeTypeString”FadeIn”, “FadeOut”, or “FadeInOut”
fadeDurationFloatFade effect duration

Features

  • IPlayer Interface: Uses standardized player interface
  • Event-Driven: Waits for action completion events
  • Flexible Fading: Configurable fade effects
  • Error Handling: Robust parameter validation

Example Usage

{
  "Name": "Player",
  "Query": "XRPlayer",
  "Option": "Teleport",
  "Data": "{\"targetTransform\":\"WaypointA\",\"shouldFade\":true,\"fadeDuration\":1.0,\"waitForCompletion\":true}",
  "Type": 0
}

7.2 HapticsAction

Precise haptic feedback control for enhanced immersion.

Options

OptionDescription
LeftSend haptic feedback to left controller
RightSend haptic feedback to right controller
BothSend haptic feedback to both controllers

Parameters

ParameterTypeDescription
hapticIntensityFloatVibration intensity (0.0 to 1.0)
hapticDurationFloatDuration in seconds
waitForCompletionBooleanWait for haptic completion

Example Usage

{
  "Name": "HapticsAction",
  "Query": "",
  "Option": "Both",
  "Data": "{\"hapticIntensity\":0.7,\"hapticDuration\":0.3,\"waitForCompletion\":true}",
  "Type": 0
}

8. Interactive Component Actions

8.1 AnimationAction

Enhanced animation control supporting both Animation and Animator components.

Options

OptionDescription
PlayPlay animation from beginning
PausePause current animation
ResumeResume from current position
StopStop current animation

Parameters

ParameterTypeDescription
_clipNameStringAnimation clip name
waitForCompletionBooleanWait for animation completion

Example Usage

{
  "Name": "Animation",
  "Query": "AnimatedObject",
  "Option": "Play",
  "Data": "{\"_clipName\":\"OpenDoor\",\"waitForCompletion\":true}",
  "Type": 0
}

8.2 ObjectHighlighterAction

Object highlighting with improved state management.

Options

OptionDescription
IdleRemove highlighting
NormalApply normal highlight
AlertApply alert/pulse highlight

Parameters

ParameterTypeDescription
enableDurationBooleanEnable timed highlighting
durationFloatHighlight duration

Example Usage

{
  "Name": "ObjectHighlighter",
  "Query": "TargetObject",
  "Option": "Normal",
  "Data": "{\"waitForCompletion\":false}",
  "Type": 0
}

8.3 TimerAction

Countdown timer with automatic component management.

Options

OptionDescription
StartStart countdown from specified duration
StopStop the timer
ResetReset timer to 0

Parameters

ParameterTypeDescription
durationFloatTimer duration in seconds

Example Usage

{
  "Name": "TimerAction",
  "Query": "TimerObject",
  "Option": "Start",
  "Data": "{\"duration\":60,\"waitForCompletion\":true}",
  "Type": 0
}

8.4 GrabbablePropertyChangeAction

Advanced grabbable object property management.

Options

OptionDescription
ChangeHandTypeRestrict which hands can grab
ChangeIsGrabbableEnable/disable grabbing

Parameters

ParameterTypeDescription
handTypeString”Left”, “Right”, or “Both”
isGrabbableBooleanGrabbable state

Example Usage

{
  "Name": "GrabbablePropertyChangeAction",
  "Query": "Tool",
  "Option": "ChangeHandType",
  "Data": "{\"handType\":\"Right\",\"waitForCompletion\":false}",
  "Type": 0
}

9. Meta Layer Actions

9.1 MetaLayerAction

Advanced visual effects system for enhanced object interaction feedback.

Options

OptionDescription
SetActiveEnable/disable meta layer components
EditModify properties of meta layer components

Supported Layer Types

  • Outline: Visual object outlining with color and width control
  • Label: Text labels with spatial positioning
  • Arrow: Directional indicators (when available)

Parameters

ParameterTypeDescription
OutlineObjectOutline configuration
LabelObjectLabel configuration
outlineColorStringHex color code (e.g., “#FF0000”)
outlineWidthFloatOutline thickness
labelTextStringText content for label
setActiveBooleanEnable/disable state for layer

Features

  • Simultaneous Control: Manage multiple layers in one action
  • Hex Color Support: Standard hex color format (#RRGGBB or #RRGGBBAA)
  • Fallback System: Uses magenta color for invalid formats
  • Auto-Component Creation: Adds components if missing

Example Usage

{
  "Name": "MetaLayerAction",
  "Query": "TargetObject",
  "Option": "Edit",
  "Data": "{\"Outline\":{\"outlineColor\":\"#00FF00\",\"outlineWidth\":2.0,\"setActive\":true},\"Label\":{\"labelText\":\"Important Item\",\"setActive\":true}}",
  "Type": 0
}