Realot StudioDocs
API reference

Complete script module member index

Every supported member name, access type, source file and the entity or global context that exposes it.

View as Markdownllms.txt

This is the complete member-name index for the script modules exposed by the supplied engine source. The allow-list in each module is the authority: entries not listed here are not part of that module’s supported script surface. Use the matching component page for full field meanings and examples.

#AnimatorAPI

Access: this.animator. Requirement: SpriteAnimation component. Source: project/runtime/scripting/components/AnimatorAPI.js.

MemberAccessPurpose
currentClipRead-only propertyThe `this.animator` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
currentFrameRead/write propertyThe `this.animator` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
play(clipName)MethodThe `this.animator` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
playingRead-only propertyThe `this.animator` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
speedRead/write propertyThe `this.animator` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
stop()MethodThe `this.animator` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
totalFramesRead-only propertyThe `this.animator` sub-object exposed to user scripts (see scripting/ScriptAPI.js).

#AudioAPI

Access: this.audio. Requirement: AudioSource component. Source: project/runtime/scripting/components/AudioAPI.js.

MemberAccessPurpose
pitchRead/write propertyThe `this.audio` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
play()MethodThe `this.audio` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
playOnce()MethodThe `this.audio` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
playingRead-only propertyThe `this.audio` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
stop()MethodThe `this.audio` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
volumeRead/write propertyThe `this.audio` sub-object exposed to user scripts (see scripting/ScriptAPI.js).

#AudioListenerAPI

Access: this.ear. Requirement: AudioListener component. Source: project/runtime/scripting/components/AudioListenerAPI.js.

MemberAccessPurpose
canHear(nameOrTag, opts)MethodThe `this.ear` sub-object exposed to user scripts (see scripting/ScriptAPI.js) — the query surface for the AudioListener component (see components/AudioListener.js).
enabledRead/write propertyThe `this.ear` sub-object exposed to user scripts (see scripting/ScriptAPI.js) — the query surface for the AudioListener component (see components/AudioListener.js).
radiusRead/write propertyThe `this.ear` sub-object exposed to user scripts (see scripting/ScriptAPI.js) — the query surface for the AudioListener component (see components/AudioListener.js).
sourcesInRangeRead-only propertyThe `this.ear` sub-object exposed to user scripts (see scripting/ScriptAPI.js) — the query surface for the AudioListener component (see components/AudioListener.js).

#CameraAPI

Access: this.camera. Requirement: Camera component. Source: project/runtime/scripting/components/CameraAPI.js.

MemberAccessPurpose
allowStretchingRead/write propertyThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
aspectModeRead/write propertyThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
aspectRatioLockRead/write propertyThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
backgroundColorRead/write propertyThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
barColorRead/write propertyThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
customHeightRead/write propertyThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
customWidthRead/write propertyThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
enablePseudo3DRead/write propertyThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
follow(entityTarget, opts)MethodThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
integerScalingRead/write propertyThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
keepHeightRead/write propertyThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
landscapeHeightRead/write propertyThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
landscapeWidthRead/write propertyThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
letterboxingRead/write propertyThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
offsetXRead/write propertyThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
offsetYRead/write propertyFollow/render Y offset.
pillarboxingRead/write propertyThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
portraitHeightRead/write propertyThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
portraitWidthRead/write propertyThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
renderToSprite(spriteEntity)MethodThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
scalingModeRead/write propertyThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
shake(intensity, duration)MethodThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
squareSizeRead/write propertyThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
stopFollow()MethodThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
xRead/write propertyThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
yRead/write propertyThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
zoomRead/write propertyThe `this.camera` sub-object exposed to user scripts (see scripting/ScriptAPI.js).

#ChatLogAPI

Access: this.chat. Requirement: ChatLog component. Source: project/runtime/scripting/components/ChatLogAPI.js.

MemberAccessPurpose
backgroundColorRead/write propertyBackground color.
backgroundOpacityRead/write propertyBackground opacity.
clear()MethodThe `this.chat` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
fontFamilyRead/write propertyFont family.
fontSizeRead/write propertyFont size.
lineHeightRead/write propertyLine height.
maxMessagesRead/write propertyMaximum retained messages.
messageColorRead/write propertyMessage color.
messagesRead-only propertyThe `this.chat` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
paddingRead/write propertyPadding.
screenSpaceRead/write propertyScreen-space mode.
send(sender, text, color)MethodThe `this.chat` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
senderColorRead/write propertyThe `this.chat` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
showSenderRead/write propertyThe `this.chat` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
visibleRead/write propertyVisibility.
visibleCountRead/write propertyNumber of visible rows.
widthRead/write propertyPanel width.

#ColliderAPI

Access: this.collider. Requirement: Collider2D component. Source: project/runtime/scripting/components/ColliderAPI.js.

MemberAccessPurpose
capsuleHalfHeightRead-only propertyCapsule half-height.
capsuleRadiusRead-only propertyCapsule radius.
densityRead-only propertyDensity.
frictionRead-only propertyFriction.
heightRead-only propertyBox height.
isColliding(other)MethodThe `this.collider` sub-object exposed to user scripts.
isOneWayPlatformRead-only propertyOne-way platform flag.
isTriggerRead/write propertyTrigger-only collider.
layerRead-only propertyLayer index 0-15.
maskRead-only property16-bit interaction mask.
offsetRead-only property{x,y} collider offset.
oneWayDirectionRead/write propertyThe `this.collider` sub-object exposed to user scripts.
radiusRead-only propertyCircle radius.
restitutionRead-only propertyRestitution.
rotationRead/write propertyThe `this.collider` sub-object exposed to user scripts.
shapeRead-only propertyBox | Circle | Capsule | Triangle.
widthRead-only propertyBox width.

#ControllerAPI

Access: this.controller. Requirement: CharacterController component. This module combines members for several movement types; a member is available only when the component is set to a compatible type (Character, Platformer, Top-Down, Car, Follow or Patrol). Free mode exposes only its small common surface.. Source: project/runtime/scripting/components/ControllerAPI.js.

MemberAccessPurpose
accelerationRead/write propertyAcceleration.
airControlRead/write propertyAir-control factor.
brakeForceRead/write propertyCar brake force.
canJumpRead/write propertyWhether jumping is available.
controllerTypeRead-only propertyRead-only movement type.
driftFactorRead/write propertyCar drift factor.
driveTowardArriveDistanceRead/write propertyMember name confirmed by the module allow-list. See the corresponding component or scripting guide for usage details.
facingDirectionRead-only propertyCurrent patrol facing direction.
flipDirection()MethodReverse Patrol direction.
followDistanceRead/write propertyFollow distance.
followSpeedRead/write propertyFollow speed.
gravityScaleRead/write propertyGravity scale.
groundAngleRead-only propertyGround angle.
isGroundedRead-only propertyGround state.
isOnCeilingRead-only propertyCeiling contact.
isOnSlopeRead-only propertySlope contact.
isOnWallRead-only propertyWall contact.
jumpForceRead/write propertyJump force.
maxJumpsRead/write propertyMaximum jumps.
maxSpeedRead/write propertyCar maximum speed.
moveSpeedRead/write propertyMovement speed.
patrolAxisRead/write propertyHorizontal | Vertical.
patrolDistanceRead/write propertyPatrol distance.
patrolModeRead/write propertyPlatformer | Top-Down.
simulateDrive(throttle, steer)MethodDrive a Car controller by script.
simulateDriveJoystick(x, y)MethodDrive using joystick-style vector input.
simulateDriveToward(x, y)MethodDrive toward a world point.
simulateJump()MethodRequest a jump.
simulateMove(x, y)MethodDrive movement by script.
targetNameRead/write propertyFollow target name.
turnSpeedRead/write propertyCar turn speed.
useDefaultInputRead/write propertyBuilt-in input mapping.
useGravityRead/write propertyGravity toggle.

#JointAPI

Access: this.joint. Requirement: Joint2D component. Source: project/runtime/scripting/components/JointAPI.js.

MemberAccessPurpose
anchor1Read/write property{x,y} local anchor on this body.
anchor2Read/write property{x,y} local anchor on connected body/world anchor.
axisRead/write propertyThe `this.joint` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
breakForceRead/write propertyMember name confirmed by the module allow-list. See the corresponding component or scripting guide for usage details.
breakableRead/write propertyThe `this.joint` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
collideConnectedRead/write propertyCollision between connected bodies.
connectedEntityRead/write propertyConnected entity context, when one exists.
dampingRead/write propertySpring damping.
disableConnectedCollisionRead/write propertyMember name confirmed by the module allow-list. See the corresponding component or scripting guide for usage details.
enabledRead/write propertyThe `this.joint` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
flexibilityAllow-listed but not implementedThe proxy allow-list contains this name, but the current JointAPI target has no getter or setter for it. Reads return undefined and writes do not update Joint2D.flexibility. Set Flexibility (%) in the Inspector instead.
jointDragRead/write propertyThe `this.joint` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
jointTypeRead/write propertyJoint type.
lengthRead/write propertyThe `this.joint` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
limitMaxRead/write propertyMaximum limit.
limitMinRead/write propertyMinimum limit.
limitsEnabledRead/write propertyThe `this.joint` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
motorEnabledRead/write propertyThe `this.joint` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
motorMaxForceRead/write propertyMaximum motor force.
motorSpeedRead/write propertyMotor speed.
restStiffnessRead/write propertyThe `this.joint` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
ropeMassRead/write propertyRope/spring segment mass.
segmentCountRead/write propertyThe `this.joint` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
stiffnessRead/write propertyThe `this.joint` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
textureFlipRead/write propertyThe `this.joint` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
textureKeyRead/write propertyThe `this.joint` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
textureModeRead/write propertyThe `this.joint` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
textureOffsetRead/write propertyThe `this.joint` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
textureScaleRead/write propertyThe `this.joint` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
textureTilingRead/write propertyThe `this.joint` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
useTextureRead/write propertyThe `this.joint` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
visualColorRead/write propertyVisual color.
visualEnabledRead/write propertyVisual enabled.
visualThicknessRead/write propertyVisual thickness.

#JoystickAPI

Access: this.joystick. Requirement: Joystick component. Source: project/runtime/scripting/components/JoystickAPI.js.

MemberAccessPurpose
activeRead-only propertyThe `this.joystick` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
angleRead-only propertyThe `this.joystick` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
baseColorRead/write propertyMember name confirmed by the module allow-list. See the corresponding component or scripting guide for usage details.
baseOpacityRead/write propertyMember name confirmed by the module allow-list. See the corresponding component or scripting guide for usage details.
baseRadiusRead/write propertyBase radius.
deadZoneRead/write propertyThe `this.joystick` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
hideWhenIdleRead/write propertyThe `this.joystick` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
idleOpacityMultiplierRead/write propertyMember name confirmed by the module allow-list. See the corresponding component or scripting guide for usage details.
knobColorRead/write propertyMember name confirmed by the module allow-list. See the corresponding component or scripting guide for usage details.
knobOpacityRead/write propertyMember name confirmed by the module allow-list. See the corresponding component or scripting guide for usage details.
knobRadiusRead/write propertyKnob radius.
magnitudeRead-only propertyThe `this.joystick` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
outlineColorRead/write propertyMember name confirmed by the module allow-list. See the corresponding component or scripting guide for usage details.
outlineWidthRead/write propertyMember name confirmed by the module allow-list. See the corresponding component or scripting guide for usage details.
positionModeRead/write propertyJoystick positioning mode.
regionHeightRead/write propertyRegion height.
regionWidthRead/write propertyRegion width.
regionXRead/write propertyThe `this.joystick` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
regionYRead/write propertyTouch/pointer region Y.
returnToCenterRead/write propertyThe `this.joystick` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
xRead-only propertyThe `this.joystick` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
yRead-only propertyThe `this.joystick` sub-object exposed to user scripts (see scripting/ScriptAPI.js).

#LightAPI

Access: this.light. Requirement: Light component. Source: project/runtime/scripting/components/LightAPI.js.

MemberAccessPurpose
angleRead/write propertyThe `this.light` sub-object exposed to user scripts on any entity that has a Light component.
castShadowsRead/write propertyThe `this.light` sub-object exposed to user scripts on any entity that has a Light component.
castsOnWorldRead/write propertyThe `this.light` sub-object exposed to user scripts on any entity that has a Light component.
colorRead/write propertyThe `this.light` sub-object exposed to user scripts on any entity that has a Light component.
coreSizeRead/write propertyLight core size.
coreVisibleRead/write propertyShow light core.
flickerRead/write propertyFlicker toggle.
flickerDurationRead/write propertyFlicker duration.
flickerSpeedRead/write propertyFlicker speed.
heightRead/write propertyThe `this.light` sub-object exposed to user scripts on any entity that has a Light component.
intensityRead/write propertyThe `this.light` sub-object exposed to user scripts on any entity that has a Light component.
radiusRead/write propertyThe `this.light` sub-object exposed to user scripts on any entity that has a Light component.
shadowColorRead/write propertyThe `this.light` sub-object exposed to user scripts on any entity that has a Light component.
shadowStrengthRead/write propertyThe `this.light` sub-object exposed to user scripts on any entity that has a Light component.
typeRead/write propertyThe `this.light` sub-object exposed to user scripts on any entity that has a Light component.
widthRead/write propertyThe `this.light` sub-object exposed to user scripts on any entity that has a Light component.

#LightingSettingsAPI

Access: scene.lighting. Requirement: Scene lighting settings; exposed through the scene global. Source: project/runtime/scripting/components/LightingSettingsAPI.js.

MemberAccessPurpose
ambientDarknessRead/write propertyThe `scene.lighting` sub-object exposed to user scripts (see scripting/ScriptAPI.js's getGlobals()) — lets scripts tune scene-wide lighting/shadow realism settings at runtime (see components/LightingSettings.js for the full field guide), e.g.
glowStrengthRead/write propertyThe `scene.lighting` sub-object exposed to user scripts (see scripting/ScriptAPI.js's getGlobals()) — lets scripts tune scene-wide lighting/shadow realism settings at runtime (see components/LightingSettings.js for the full field guide), e.g.
raymarchStepsRead/write propertyThe `scene.lighting` sub-object exposed to user scripts (see scripting/ScriptAPI.js's getGlobals()) — lets scripts tune scene-wide lighting/shadow realism settings at runtime (see components/LightingSettings.js for the full field guide), e.g.
shadowModeRead/write propertyThe `scene.lighting` sub-object exposed to user scripts (see scripting/ScriptAPI.js's getGlobals()) — lets scripts tune scene-wide lighting/shadow realism settings at runtime (see components/LightingSettings.js for the full field guide), e.g.

Access: this.navAgent. Requirement: NavAgent2D component. Source: project/runtime/scripting/components/NavAgentAPI.js.

MemberAccessPurpose
accelerationRead/write propertyAcceleration.
areaRead/write propertyAllowed area mask.
areaCostsRead/write property16-entry area cost overrides.
autoRepathRead/write propertyAuto-repath.
avoidanceEnabledRead/write propertyAvoidance toggle.
avoidancePriorityRead/write propertyAvoidance priority.
collabEnabledRead/write propertyCollaborative vehicle avoidance.
collabGroupRadiusRead/write propertyGroup radius.
currentPathRead-only propertyRead-only world-space waypoint array or null.
currentPathIndexRead-only propertyRead-only current waypoint index.
decelerationRead/write propertyDeceleration.
radiusRead/write propertyAgent radius.
repathDistanceRead/write propertyTarget-move repath threshold.
repathIntervalRead/write propertyRepath interval.
speedRead/write propertyPreferred speed.
stoppingDistanceRead/write propertyStopping distance.
vehicleCornerLookaheadRead/write propertyCorner lookahead.
vehicleCornerSlowdownRead/write propertyCorner slowdown.
vehicleLookaheadRead/write propertyVehicle lookahead.
vehicleObstacleBrakeRead/write propertyObstacle brake factor.
vehicleObstacleLookaheadRead/write propertyObstacle lookahead.
vehicleObstacleWidthRead/write propertyObstacle width.
vehicleRecoveryReverseTimeRead/write propertyReverse recovery time.
vehicleRecoveryTimeRead/write propertyRecovery time.
vehicleSpeedSmoothingRead/write propertySpeed smoothing.
vehicleSteerSmoothingRead/write propertySteering smoothing.

#RigidbodyAPI

Access: this.rigidbody. Requirement: Rigidbody2D component. Source: project/runtime/scripting/components/RigidbodyAPI.js.

MemberAccessPurpose
addAngularImpulse(t)MethodThe `this.rigidbody` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
addForce(x, y)MethodThe `this.rigidbody` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
addForceAtPoint(x, y, pointX, pointY)MethodThe `this.rigidbody` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
addImpulse(x, y)MethodThe `this.rigidbody` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
addTorque(t)MethodThe `this.rigidbody` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
angularDampingRead/write propertyAngular damping.
gravityScaleRead/write propertyGravity multiplier.
groundAngleRead-only propertyThe `this.rigidbody` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
groundAngleLimitRead/write propertyThe `this.rigidbody` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
groundedRead-only propertyThe `this.rigidbody` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
isGroundedRead-only propertyThe `this.rigidbody` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
isOnCeilingRead-only propertyThe `this.rigidbody` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
isOnSlopeRead-only propertyThe `this.rigidbody` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
isOnWallRead-only propertyThe `this.rigidbody` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
linearDampingRead/write propertyLinear damping.
massRead/write propertyDynamic mass.
move(dx, dy)MethodThe `this.rigidbody` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
resolvedVelocityRead-only propertyThe `this.rigidbody` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
slopeMinAngleRead/write propertyThe `this.rigidbody` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
typeRead/write propertyDynamic | Kinematic | Static; switching type is supported at runtime.
velocityRead/write property{x,y} velocity.
velocityXRead/write propertyHorizontal velocity.
velocityYRead/write propertyVertical velocity.
wallAngleLimitRead/write propertyThe `this.rigidbody` sub-object exposed to user scripts (see scripting/ScriptAPI.js).

#SaveAPI

Access: save. Requirement: Global save store; no entity component required. Source: project/runtime/scripting/components/SaveAPI.js.

MemberAccessPurpose
clear()MethodThe `save` global exposed to user scripts (see scripting/ScriptAPI.js getGlobals()).
delete(key)MethodThe `save` global exposed to user scripts (see scripting/ScriptAPI.js getGlobals()).
deleteSlot(slotName)MethodThe `save` global exposed to user scripts (see scripting/ScriptAPI.js getGlobals()).
flushNow()MethodThe `save` global exposed to user scripts (see scripting/ScriptAPI.js getGlobals()).
get(key)MethodThe `save` global exposed to user scripts (see scripting/ScriptAPI.js getGlobals()).
has(key)MethodThe `save` global exposed to user scripts (see scripting/ScriptAPI.js getGlobals()).
isReadyRead-only propertyThe `save` global exposed to user scripts (see scripting/ScriptAPI.js getGlobals()).
keys()MethodThe `save` global exposed to user scripts (see scripting/ScriptAPI.js getGlobals()).
listSlots()MethodThe `save` global exposed to user scripts (see scripting/ScriptAPI.js getGlobals()).
load(slotName)MethodThe `save` global exposed to user scripts (see scripting/ScriptAPI.js getGlobals()).
onError(callback)MethodThe `save` global exposed to user scripts (see scripting/ScriptAPI.js getGlobals()).
set(key, value)MethodThe `save` global exposed to user scripts (see scripting/ScriptAPI.js getGlobals()).
slotRead-only propertyThe `save` global exposed to user scripts (see scripting/ScriptAPI.js getGlobals()).

#ShadowCasterAPI

Access: this.shadowCaster. Requirement: ShadowCaster component. Source: project/runtime/scripting/components/ShadowCasterAPI.js.

MemberAccessPurpose
enabledRead/write propertyThe `this.shadowCaster` sub-object exposed to user scripts on any entity that has a ShadowCaster component (see components/ShadowCaster.js).
heightRead/write propertyThe `this.shadowCaster` sub-object exposed to user scripts on any entity that has a ShadowCaster component (see components/ShadowCaster.js).
lengthRead/write propertyThe `this.shadowCaster` sub-object exposed to user scripts on any entity that has a ShadowCaster component (see components/ShadowCaster.js).
offsetXRead/write propertyThe `this.shadowCaster` sub-object exposed to user scripts on any entity that has a ShadowCaster component (see components/ShadowCaster.js).
offsetYRead/write propertyThe `this.shadowCaster` sub-object exposed to user scripts on any entity that has a ShadowCaster component (see components/ShadowCaster.js).
opacityRead/write propertyThe `this.shadowCaster` sub-object exposed to user scripts on any entity that has a ShadowCaster component (see components/ShadowCaster.js).
softnessRead/write propertyThe `this.shadowCaster` sub-object exposed to user scripts on any entity that has a ShadowCaster component (see components/ShadowCaster.js).
widthRead/write propertyThe `this.shadowCaster` sub-object exposed to user scripts on any entity that has a ShadowCaster component (see components/ShadowCaster.js).

#ShapeAPI

Access: this.shape. Requirement: ShapeRenderer component. Source: project/runtime/scripting/components/ShapeAPI.js.

MemberAccessPurpose
capsuleHalfHeightRead/write propertyThe `this.shape` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
capsuleRadiusRead/write propertyThe `this.shape` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
fillColorRead/write propertyThe `this.shape` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
heightRead/write propertyThe `this.shape` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
opacityRead/write propertyThe `this.shape` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
outlineColorRead/write propertyThe `this.shape` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
outlineEnabledRead/write propertyThe `this.shape` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
outlineWidthRead/write propertyThe `this.shape` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
radiusRead/write propertyThe `this.shape` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
shapeTypeRead/write propertyThe `this.shape` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
visualRotationRead/write propertyThe `this.shape` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
widthRead/write propertyThe `this.shape` sub-object exposed to user scripts (see scripting/ScriptAPI.js).

#SpeechBubbleAPI

Access: this.speechBubble. Requirement: SpeechBubble component. Source: project/runtime/scripting/components/SpeechBubbleAPI.js.

MemberAccessPurpose
backgroundColorRead/write propertyBackground color.
borderColorRead/write propertyBorder color.
borderWidthRead/write propertyBorder width.
cornerRadiusRead/write propertyCorner radius.
fontFamilyRead/write propertyFont family.
fontSizeRead/write propertyFont size.
hide()MethodThe `this.speechBubble` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
maxWidthRead/write propertyThe `this.speechBubble` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
offsetXRead/write propertyThe `this.speechBubble` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
offsetYRead/write propertyVertical offset.
paddingRead/write propertyPadding.
show(text, duration)MethodThe `this.speechBubble` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
tailDirectionRead/write propertyThe `this.speechBubble` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
tailSizeRead/write propertyTail size.
textRead/write propertyThe `this.speechBubble` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
textColorRead/write propertyText color.
visibleRead/write propertyThe `this.speechBubble` sub-object exposed to user scripts (see scripting/ScriptAPI.js).

#SpriteAPI

Access: this.sprite. Requirement: SpriteRenderer component. Source: project/runtime/scripting/components/SpriteAPI.js.

MemberAccessPurpose
colorRead/write propertyHex tint color.
flipXRead/write propertyHorizontal mirror.
flipYRead/write propertyVertical mirror.
opacityRead/write propertyThe `this.sprite` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
textureRead/write propertySprite asset key.
visualRotationRead/write propertyThe `this.sprite` sub-object exposed to user scripts (see scripting/ScriptAPI.js).

#StateAPI

Access: this.state. Requirement: Available on every entity; no component required. Source: project/runtime/scripting/components/StateAPI.js.

MemberAccessPurpose
change(name)MethodThe `this.state` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
currentRead-only propertyThe `this.state` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
previousRead-only propertyThe `this.state` sub-object exposed to user scripts (see scripting/ScriptAPI.js).

#StrokePathAPI

Access: this.strokePath. Requirement: StrokePath component. Source: project/runtime/scripting/components/StrokePathAPI.js.

MemberAccessPurpose
addPoint(x, y)MethodThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
capModeRead/write propertyThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
colorRead/write propertyThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
firstPointRead-only propertyThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
getLength()MethodThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
getPoint(index)MethodThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
insertPoint(index, x, y)MethodThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
jointModeRead/write propertyThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
lastPointRead-only propertyThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
localToWorld(localX, localY)MethodThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
opacityRead/write propertyThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
pointCountRead-only propertyThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
pointsRead/write propertyThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
removePoint(index)MethodThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
setPoint(index, x, y)MethodThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
textureFlipRead/write propertyThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
textureKeyRead/write propertyThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
textureModeRead/write propertyThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
textureOffsetRead/write propertyThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
textureRotationRead/write propertyThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
textureScaleRead/write propertyThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
textureTilingRead/write propertyThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
thicknessRead/write propertyThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
useTextureRead/write propertyThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.
worldToLocal(worldX, worldY)MethodThe `this.strokePath` sub-object exposed to user scripts on any entity that has a StrokePath component.

#TextAPI

Access: this.text. Requirement: TextRenderer component. Source: project/runtime/scripting/components/TextAPI.js.

MemberAccessPurpose
alignRead/write propertyThe `this.text` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
anchorXRead/write propertyThe `this.text` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
anchorYRead/write propertyVertical anchor.
boldRead/write propertyBold toggle.
colorRead/write propertyHex text color.
fontFamilyRead/write propertyFont family.
fontSizeRead/write propertyFont size.
italicRead/write propertyItalic toggle.
opacityRead/write propertyThe `this.text` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
screenSpaceRead/write propertyThe `this.text` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
valueRead/write propertyThe `this.text` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
wordWrapRead/write propertyEnable word wrapping.
wrapWidthRead/write propertyThe `this.text` sub-object exposed to user scripts (see scripting/ScriptAPI.js).

#TextInputAPI

Access: this.textInput. Requirement: TextInput component. Source: project/runtime/scripting/components/TextInputAPI.js.

MemberAccessPurpose
backgroundColorRead/write propertyBackground color.
borderColorRead/write propertyBorder color.
borderWidthRead/write propertyBorder width.
clear()MethodThe `this.textInput` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
clearOnSubmitRead/write propertyThe `this.textInput` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
cornerRadiusRead/write propertyCorner radius.
focusedRead-only propertyThe `this.textInput` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
fontFamilyRead/write propertyFont family.
fontSizeRead/write propertyFont size.
heightRead/write propertyControl height.
justSubmittedRead-only propertyThe `this.textInput` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
maxLengthRead/write propertyCharacter cap.
paddingRead/write propertyPadding.
placeholderRead/write propertyPlaceholder.
placeholderColorRead/write propertyPlaceholder color.
textColorRead/write propertyText color.
valueRead/write propertyThe `this.textInput` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
widthRead/write propertyControl width.

#TouchTrackAPI

Access: this.myTouch. Requirement: Available on every entity; no component required. Source: project/runtime/scripting/components/TouchTrackAPI.js.

MemberAccessPurpose
activeRead-only propertyThe `this.myTouch` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
disable()MethodThe `this.myTouch` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
enable()MethodThe `this.myTouch` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
enabledRead-only propertyThe `this.myTouch` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
startTracking()MethodThe `this.myTouch` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
stopTracking()MethodThe `this.myTouch` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
xRead-only propertyThe `this.myTouch` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
yRead-only propertyThe `this.myTouch` sub-object exposed to user scripts (see scripting/ScriptAPI.js).

#TransformAPI

Access: this.transform. Requirement: Available on every entity; no component required. Source: project/runtime/scripting/components/TransformAPI.js.

MemberAccessPurpose
lookAt(x, y)MethodPoint the entity toward a world-space point.
positionRead/write property{ x, y } world-space position; read or assign.
rotationRead/write propertyRotation in degrees.
scaleRead/write propertyMember name confirmed by the module allow-list. See the corresponding component or scripting guide for usage details.
translate(dx, dy)MethodMove by a delta amount.

#Global runtime objects and functions

The global runtime API is separate from per-entity component modules. The exact global members and common option shapes are described in Runtime modules, Global API, Input, and Persistence.

#Entity lookup functions

  • findFirst(name)
  • findAll(name)
  • findFirstWithTag(tag)
  • findAllWithTag(tag)
  • findWithTag(tag)
  • findById(id)
  • findInRadius(x, y, radius, opts)

#Scene (`scene`)

  • findFirst(name)
  • findAll(name)
  • findFirstWithTag(tag)
  • findAllWithTag(tag)
  • findWithTag(tag)
  • findById(id)
  • load(sceneName)
  • restart()
  • pause()
  • resume()
  • isPaused (read-only)
  • current (read-only)
  • lighting

#Physics (`physics`)

  • raycast(x1, y1, x2, y2, opts)
  • layer(...indices)
  • findPath(x1, y1, x2, y2, opts)
  • isWalkable(x, y)
  • bake()
  • areaIndex(name)
  • areaMask(...names)
  • areaCosts(costsByName)

#Input (`input`)

  • keyDown(key)
  • keyPressed(key)

#Mouse (`mouse`)

  • x, y (world-space)
  • screenX, screenY (canvas pixels)
  • over (read-only)
  • down(button?)
  • pressed(button?)
  • released(button?)
  • isOver(entityOrName, opts)
  • clickedOn(entityOrName, opts, button?)

#Touch (`touch`)

  • count, first, anyJustStarted, anyJustEnded
  • per-touch: id, x, y, screenX, screenY, startX, startY, dx, dy, distance, justStarted, justEnded
  • swipe: active, direction, dx, dy, distance
  • pinch: active, scale, delta, distance
  • isOver(entityOrName, opts)
  • tappedOn(entityOrName, opts)

#Time (`time`)

  • deltaTime
  • unscaledDeltaTime
  • elapsed
  • scale

#Random (`random`)

  • int(min, max)
  • float(min, max)

#Math helpers (`mathx`)

  • lerp(a, b, t)
  • smoothstep(a, b, value)
  • clamp(value, min, max)
  • moveToward(current, target, maxDelta)
  • remap(value, inMin, inMax, outMin, outMax)
  • approximately(a, b, epsilon?)

#Global state (`global`)

  • Read, write and test arbitrary named in-memory values shared by scripts; resets when the game page is reloaded.

#Debug HUD (`debug`)

  • show(on?)
  • showFps(on?)
  • log(label, value)
  • clear(label)
  • clearAll()

#Object pools (`pool`)

  • create(name, options)
  • find(name)
  • get(name, x, y)
  • release(entity)

#Global functions

  • spawn(nameOrTag, opts)
  • wait(seconds, callback)
  • cancelWait(timerId)
  • repeat(seconds, callback)
  • cancelRepeat(timerId)
  • sendMessage(tagOrEntity, message, data)
  • broadcastMessage(message, data)
  • tween(target, properties, duration, easing?, onComplete?)
  • cancelTween(tweenId)
  • smoothstep(a, b, value)