Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/Scripting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,33 @@ Every gameplay language uses engine-owned built-in functions. Scripts define
callbacks and call the API; no user-written JSON request/response loop is needed.
CSS styling for rendered HTML game UI is planned. Today CSS-only assets are validated no-op behaviors; use inline JavaScript in HTML for gameplay API calls.

## Missing scripts during Play

Press **Play** after creating or attaching scripts through **Programming > New
Script**, **Programming > Attach Existing Script**, or **+ Add Component** in the
Inspector. If an enabled global startup, scene startup, or object component script
has a missing Asset ID in the script manifest or its source file has been deleted,
Play skips that attachment and continues running the scene and the remaining
scripts. This also applies to automatically added startup scripts. Missing scripts
are not retried during the same play session.

The runtime log shows a warning naming the missing script ID or source path and
`skipped for this play session`. To recover, stop Play, restore the file at the
reported path or remove/replace the attachment through the editor, then press
Play again. Do not edit serialized scene or manifest files to repair attachments.
Manual script reload skips missing source files and continues reloading available
files; an already running instance keeps its last good code.

For HTML assets, a missing quoted `<script src="...">` file produces a warning
and contributes no code. Later linked scripts and inline script bodies still run.
For example, `<script src="missing.js"></script>` followed by an inline behavior
continues with the inline behavior even when `missing.js` does not exist. Keep
linked paths relative to the HTML asset, in its directory or a child directory.

This recovery applies to missing scripts only. Invalid settings or manifests,
unreadable files for other reasons, syntax errors, and linked paths containing
`..` or absolute paths still fail existing validation.

## Rules shared by every language

Create, move, rename, and attach scripts in the editor. Never edit
Expand Down
4 changes: 4 additions & 0 deletions docs/Scripting/scriptingWeb/html-behavior.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ on `globalThis.behavior` run.

HTML layout and CSS styling for game UI are planned. The sample above exercises
JavaScript callbacks only; it does not currently display a rendered HTML body.

A missing linked script is skipped with a runtime warning for that play session.
Remaining linked and inline scripts continue running. Restore the file, stop Play,
and start Play again to load it. Missing files are not retried during the session.
Loading