Scripting API
Updated
The Scripting API covers everything a Behavior script and a scene author can use. Start with Basic principles, then open the section you need.
Basic principlesThe runtime, scenes, entities and components, how a script runs, and the scripting language: hooks, directives, slots, globals, signals and timing.
ScenesScenes and their structure: the scene root, groups and Behavior entities, and switching scenes.
EditorScripts that help you author: editor code, slot buttons and validation.
ComponentsWhat a component is, the common components, and the catalog of all of them.
LayersGrouping entities so they can be switched off, locked or made unclickable together.
InputReading keyboards, pointers, touch, XR controllers and sensors.
InteractionLetting players click, grab, drag and snap objects.
MeshesModels and primitives, materials, shaders, terrain, grass, water and splats.
EffectsDecals, fire and masks.
MediaImages, video, documents and words in the world.
LightingLights, shadows, environment and baked light.
CamerasWhat the player sees: cameras, controllers and camera effects.
Post-processingSepia, pixelation, bloom, glitch and other effects on a camera.
AudioMusic, sound effects, spatial sound, synthesis and filters.
UIPanels, controls and notifications for desktop, mobile and XR.
PhysicsWeight, solidity, collisions and joints.
AnimationClips, timelines, state machines and secondary motion.
MovementThe Character Controller and teleport.
NavigationSpawn, spot and travel points, and characters that find their own way: navmeshes, agents and steering.
XRImmersive sessions in VR and AR.
MultiplayerShared rooms with Arena: ownership, replication, presence and chat.
Logic and AIData that outlives the session, and conversational agents that live in the scene.