Skip to content

Script Object ​

Component for a script object — a single ScriptObject whose THREE.js visual is built by user code and runs in the editor AND at runtime. Unlike ScriptComponent this holds ONE script (not an entries array). The live instance ref is non-enumerable so it never leaks into save data or undo history.

Editor inspector ​

Screenshot

Add a screenshot of the Script Object component in the editor inspector here. Suggested asset path: /public/images/inspector/script-object.png

md
![Script Object inspector](/images/inspector/script-object.png)

Properties ​

PropertyTypeDescription
scriptUrlstring | null—
classNamestring | null—
enabledboolean—
dataRecord<string, unknown>—
runtimeStateScriptObjectRuntimeState—
runtimeMessagestring—
instanceunknown | nullLive ScriptObject instance. Non-enumerable — never enters snapshots/history.

API reference ​