world.connect
Pin the engine of the world editor the user has open, so engine tools (execute, capture, …) drive it for the rest of this conversation. An engine that is already connected returns at once. It is held only for an engine that is about to connect: once the editor has drawn its first frame the call holds, up to about 30 s, until the engine connects. In every other case it answers at once with connected: false and what the editor is doing (editor.state: never_opened, launching, booting, connecting, stalled, failed, started_not_connected), so while an editor is still loading do what needs no engine and call this again when you need one. waited_ms is how long the call was held (0 when it was not) and wait says how the wait ended. It opens nothing: nothing on the server can open a browser. Call world.open first and act on its next, which says whether you show the user a link or run a command on their machine. A world with engines on more than one branch is refused rather than guessed at: name the branch, or use session.list / session.connect to pick one engine outright.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| guid | No | The same argument as `world`, under another name: give one of the two. A call giving them two different worlds is refused. | |
| world | No | Optional: the guid of the world whose editor you mean (world.list names each of your worlds beside its guid). Omitted, any open editor. A value that is not a guid, a world's name included, is refused and connects nothing. | |
| branch | No | Which branch's engine you mean, when the world has engines on more than one. |