Getting Started
Introduction
Installation
Project Configuration
Testing in Your Sandbox
Samples & Examples
Core Concepts & Glossary
Package Types
Spaces & Space Templates
Custom Avatars
Custom Avatar Animations
Avatar Attachments
Custom Prefab Objects
Embedded Packages
Drivable Vehicles
Scene Setup
Testing In Unity vs Sandbox
Controlling the Camera
Custom Collision, Layers, and Tags
Audio Mixers and Groups
Key Differences from Standard Unity3D development
Economy
Quests and Rewards
Economy Overview
Monetization
Items
Consumable Items
Rewarding Items
World Currency
Selling Items
Scripting
‣
‣
Components
Entrance Point
Camera Passthrough
Interactable
Trigger Event
Point Of Interest
Environment Settings Overrides
Render Pipeline Settings Overrides
Movement Materials
Climbable
Avatar Teleporter
Empty Frame
Projector Surface
Seat Hotspot
Guidelines
Supported Features and Limitations
Performance Guidelines
Lighting
Publishing to Spatial
Finding Published Packages
Support
FAQs
Help and Support
Release Notes
Asset Import Settings
THIS and Referencing a Spatial Component in VS
In Visual Scripting many events and actions give you the option between referencing a specific spatial component or using
This
. Take the Spatial Trigger on Exit
event for example:This
means it will look for a Trigger Event
attached to the same GameObject as the ScriptMachine
.
Bellow is an example of the condition needed for This
to work. Notice both the Trigger Event
and Script Machine
components are part of the same GameObject.
If the Trigger Event
was not on the same GameObject This
would equal NULL and the event would never fire.If you don’t want to use
This
and instead want to reference a specific component, you can do that through a GameObject reference.
In the following example I have a scene variable of type GameObject defined. I can then use that variable as an Input into the Spatial Trigger On Enter
event to receive the event for the trigger on that particular GameObject from any script in the scene.