Skip to content

Scripting API ​

Look up a class in the class index, then select a method or property for its declaration, parameters, return value, and behavior. The sidebar and search cover the same API available in Scripts → Manual → Reference → Full API inside the editor.

OpalScript uses C#-like syntax. It runs Opal's game APIs, not C# or .NET libraries. Scripts inherit from Component; attach them to an object in the Inspector and use Save & Apply before Play.

Common APIs ​

ClassUse it to
ComponentRun lifecycle callbacks, expose Inspector properties, and look up components.
EntityRefer to a scene object and access its components.
InputRead named button, axis, and vector actions. Configure them in Settings → Project Input.
RigidBody2DSet velocity, apply impulses, and read a rigid body's simulation state.
SoftBody2DMove a deformable body and inspect its contacts and deformation.
TransformRead and change an object's transform.
SceneFind, spawn, and destroy objects.
TimeRead frame and physics timing, wait, and manage time groups.
GameRead and write declared game variables.
Vector2Work with 2D positions and vectors.
HealthApply damage and healing. HealthChange describes the result.
EventSubscribe to a typed event or await its next payload.

Browse every class →

Start with a working example ​

  • Jump with Space — create a binding, attach a rigid or soft body, jump from a floor, and diagnose a missing jump.
  • Your first component — make an object spin and expose its speed in the Inspector.
  • Small gameplay examples — movement, collecting coins, waiting, and chasing a target.
  • Flap — build a complete game with gravity, obstacles, score, and restart.

Learn the language and workflow ​

Flow and JavaScript Behavior Components are separate authoring APIs. Their references remain available through the editor manual's Flow scripting filter and the Behavior Components guide.