EditorScopeHost extension

What only the editor that hosts a scope does with it: rebuild its registries, add its own tools, and connect what the scope asks of the editor's windows. Exported by host.dart; a module never needs it.

on

Properties

assetReloader ↔ void Function(Iterable<String> paths)?

Available on EditorScope, provided by the EditorScopeHost extension

What EditorScope.reloadAssets calls: set by the editor plugin while it runs.
getter/setter pair
authoredStateGuards → List<void Function()>

Available on EditorScope, provided by the EditorScopeHost extension

Ways of putting the world back to the scene as authored (EditorScope.restoreAuthoredState), for whatever shows something else in it for a while — a timeline being previewed.
no setter
authoredStateHeld → List<bool Function()>

Available on EditorScope, provided by the EditorScopeHost extension

Tests of whether the world is held away from the scene as authored (EditorScope.isAuthoredStateHeld); whoever adds a guard can add one.
no setter
dockOpener ↔ void Function(String id)?

Available on EditorScope, provided by the EditorScopeHost extension

What EditorScope.openDock calls: set by the editor.
getter/setter pair
viewOverride ↔ EditorView?

Available on EditorScope, provided by the EditorScopeHost extension

A view standing in for EditorScope.editorView while one pane of a split viewport is drawn or handled: everything that picks, places or paints through the editor's view then works in that pane. Null otherwise.
getter/setter pair

Methods

addBuiltIn(EditorModule make(EditorScope scope)) → void

Available on EditorScope, provided by the EditorScopeHost extension

Adds the module make makes to the built-ins the editor brings (ModuleRegistry.builtIns), ahead of every other module, and rebuilds the registries — for a scope made before its host knew of it. Nothing happens when one with that id is there already.
reassemble() → void

Available on EditorScope, provided by the EditorScopeHost extension

After a hot reload: the editor's own presets made again, each module told (EditorModule.onReassemble), then every registry rebuilt from the code as it now is (reload), and the palette in use shown as it now is. JustGameEditorPlugin.reassemble calls this.
reload() → void

Available on EditorScope, provided by the EditorScopeHost extension

Rebuilds every scope-level registry from scratch: built-ins, then each module's contributions in registration order. Idempotent, so it is safe on every hot reload — and nothing a module stopped contributing survives. A module's EditorModule.onRegister runs on its first pass only.