Skip to main content

Limits and crashes

Scripts run in a sandbox, so one broken script cannot freeze or crash StageTime.

When a script crashes​

A script that divides by zero, reads past the end of an array, uses a null reference or breaks a limit below is stopped on that player's device and logs one error with the reason. The rest of the world keeps running. If a method of another script crashes, the script that called it stops too.

Limits​

LimitValue
Work per eventabout 200 000 instructions for everything one event does, including other scripts it calls. An endless loop stops the script instead of freezing the frame.
Memory per event8 MB of new strings and arrays
Strings16 384 characters
Arrays65 536 elements
Synced data96 words per script (details)
Synced strings60 bytes (UTF-8)
Delayed events64 pending per script
Scripts calling each other8 deep
Logging20 lines per second per script
Compiled script1 MB

Performance tips​

  • Avoid work in Update that only needs to happen sometimes. Use SendCustomEventDelayedSeconds for timers.
  • Build strings only when they change, not every frame.
  • Keep mirrors and real-time lights few: standalone headsets have little GPU to spare.