Skip to main content

API Reference

Everything a world script can call. The StageTime SDK pages come from the SDK itself; the Unity and .NET pages list exactly the members the StageTime sandbox allows (760 members of 42 types). Calling anything else is reported as a compile error when you build your world.

StageTime SDK​

  • StageTimeBehaviour — Base class for world scripts. Add your script to a GameObject in the world and fill its public fields in the Inspector. When the world is built, the script is compiled to a sandboxed WebAssembly module and runs on every player's device.
  • [Synced] — A field whose value is shared with every player in the room. Only the object's owner can change it; see Networking.SetOwner. Supported types: bool, int, float, double, string (up to 60 UTF-8 bytes), Vector2, Vector3, Vector4, Quaternion, Color, and fixed-length arrays of those (not strings), sized by their initializer (new int[4]). Changes are sent automatically.
  • Networking — Room and ownership information.
  • NetworkEventTarget — Who runs a network event (StageTimeBehaviour.SendCustomNetworkEvent).
  • StageTimePlayer — A player in the room.
  • Utilities — Helpers.
  • STPickup — Lets players pick up this object in VR and on desktop. Its position is synced for everyone and the holder becomes the owner. Needs a collider. Scripts on the same GameObject get OnPickup, OnDrop, OnPickupUseDown and OnPickupUseUp. Without a Rigidbody it stays where it is dropped. Add a Rigidbody for physics: its Is Kinematic and Use Gravity are kept, a non-kinematic pickup can be thrown, and it falls, rolls and collides the same for everyone.
  • STSeat — A seat. Players sit by clicking it and stand up with Jump (or exitButton). Needs a collider. A seat that moves (for example inside a vehicle) carries its player with it, on every device. Scripts on the same GameObject get OnSeatEntered and OnSeatExited on every player's device.
  • STMirror — Turns this quad into a mirror. Local only, no networking. Mirrors are costly on standalone headsets: keep them small and few.

Unity: objects​

Object · GameObject · Component · Behaviour · Transform

Unity: maths and time​

Mathf · Vector2 · Vector3 · Vector4 · Quaternion · Color · Random · Time

Unity: physics​

Rigidbody · Collider

Unity: rendering, audio, animation​

Renderer · SkinnedMeshRenderer · Material · Texture · Light · ParticleSystem · AudioSource · AudioClip · Animator

Unity: UI and text​

TMP_Text · Graphic · Text · Image · RawImage · Selectable · Slider · Toggle

.NET types and logging​

String · Int32 · Single · Double · Boolean · Debug

Other​

TMP_Dropdown · TMP_InputField · Dropdown · InputField