BuiltInAssetStoreModule class

The Asset Store: how a project gets art, sound, editor tools and kits.

It adds:

  • the store window, to browse, install, update and remove items: the shop button under the transform tools (a feature of the editor, in a frame of its own below Q/W/E/R), its tile and tip on the start card, and Ctrl+Shift+G (Cmd+Shift+G on macOS);
  • "Show in the Asset Store" on installed packages in the Assets dock, and "Get assets from the store" on assets/;
  • its settings page: catalogs, the Flutter SDK, downloads;
  • checks in the Problems dock: missing package folders, out-of-date generated files, an entry point that doesn't register store items, items the store took down.

Installs go through just_asset_store, the same code just store … and a catalog's CI run, so all three agree on what an item may do.

One of the editor's own modules, for every game: JustGameEditorPlugin brings it itself. The plugins and kits it installs register through the generated lib/editor/store_modules.g.dart, so a broken generated file can't take the store down with it, and the store can always repair it.

Inheritance

Constructors

BuiltInAssetStoreModule({String? root, List<SourceConfig>? sources, String? cacheDir, PubRunner? pub})
The store for the project at root (the working directory when null).

Properties

assetActions → List<AssetAction>
What this module can do with a file in the Assets dock.
no setteroverride
assetKinds → List<AssetKind>
Kinds of file it knows: how the asset browser shows them and what dropping one on the viewport makes (see AssetKind).
no setterinherited
cacheDir → String?
The download cache; the per-user one when null.
final
commands → List<DesignerCommand>
Commands this module adds, or replaces by reusing a built-in's id.
no setteroverride
componentExtras → List<ComponentEditorExtras>
Editor-only additions to how components are inspected: header actions, a custom section, a replacement editor for one field.
no setterinherited
componentGroups → List<String>
Add-Component picker groups this module's definitions use, in the order they should appear after the built-in groups.
no setterinherited
dataFileSuffixes → List<String>
Endings of the JSON files this module owns (.ui.json), so the editor never takes one for a sprite atlas — which is what it assumes of any .json it does not recognise.
no setteroverride
designerModes → Set<SceneMode>
The scene modes this module is a level designer for: the switch lists it only while a scene of one of them is open, as the platformer kit is listed for 2-D levels and a 3-D kit for 3-D ones.
no setterinherited
designerPanels → List<SidePanelSection>
Sections added to the designer's side panel.
no setterinherited
docks → List<DockDefinition>
Bottom docks beside the built-in ones.
no setterinherited
entityIcons → List<EntityIcon>
Icons for the kinds of entity this module's game is made of — a coin, a hazard, a checkpoint. Asked in EntityIcon.order, and the first non-null answer is the one drawn.
no setterinherited
fieldAccessories → List<FieldAccessory>
What the inspector puts beside component fields, and tells of the edits made through them (see FieldAccessory).
no setterinherited
fieldEditors → Map<String, FieldEditorBuilder>
Inspector editors for this module's own field types, by jge.FieldType.id. Registered over the built-ins, so a module can also replace one of those.
no setterinherited
gettingStartedTips → List<GettingStartedTip>
What the start card — shown over the viewport while no scene is open — says about this module: where the player starts, the key that draws a path.
no setteroverride
gridTopology → GridTopology?
The shape of the designer's cells, when this module changes it. The last module to answer wins; null keeps the square grid.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
icon → IconData?
Optional icon for that listing.
no setteroverride
id → String
Stable identifier. Registering twice with the same id replaces the first.
no setteroverride
inheritedColors → List<InheritedColor>
What an unset colour field falls back to, for the components this module knows — so the inspector can show it rather than a blank.
no setterinherited
inspectorSections → List<InspectorSection>
Inspector sections after the component sections.
no setterinherited
keyBindings → List<KeyBinding>
Key chords for commands, this module's or anyone's. A chord bound here takes precedence over a built-in binding of the same chord.
no setteroverride
layers → List<LayerPreset>
Named draw-order layers this genre expects.
no setterinherited
levelAids → LevelAids?
What this game kit knows about how its levels are played — its player's jump and slopes, its kill height, starting play from a point — for the Level Designer's aids. Asked of every module.
no setterinherited
markers → List<EditorMarker>
Icons the viewport draws at every entity of a kind, so things with nothing to draw can be found (see EditorMarker).
no setterinherited
name → String
Display name, shown wherever modules are listed.
no setteroverride
overlays → List<DesignerOverlay>
Things drawn over the level, each with its own visibility toggle.
no setterinherited
pickTests → List<EntityRayTest>
What knows the real shape of some entities, so a 3-D pick lands on what is drawn rather than its box (a model's triangles).
no setterinherited
prefabCategories → List<PrefabCategory>
Palette groups this module's prefabs use, with their order.
no setterinherited
prefabPictures → List<PrefabPicture>
Pictures for prefabs in the palette (see PrefabPicture): asked in turn, the first that draws one wins; a prefab without one shows its icon.
no setterinherited
prefabs → List<PrefabDefinition>
Palette entries the draw and paint tools can place — while this module is the Level Designer (see providesLevelDesigner).
no setterinherited
prefabVariants → List<PrefabVariant>
Other ways to offer the prefabs any module offers in space: a physics module's Solid and Trigger of every shape (see PrefabVariant).
no setterinherited
protectionRule → EntityProtectionRule?
Which entities this module says must not be deleted; see EditorScope.isProtected.
no setterinherited
providesLevelDesigner → bool
Whether this module is a level designer of its own: an entry in the designer's switch beside the built-in one, whose designer contributions are live only while it is chosen.
no setterinherited
pub → PubRunner?
Runs pub get; the project's Flutter SDK when null (tests use a fake).
final
root → String?
The project folder; the working directory when null.
final
rowDecorations → List<SceneTreeRowDecoration>
Things drawn at the end of scene-tree rows.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sceneTreeActions → List<SceneTreeAction>
Entries in an entity's scene-tree context menu.
no setterinherited
settingsSections → List<SettingsSection>
Sections on the settings dialog's Modules tab.
no setteroverride
sharedPrefabs → List<PrefabDefinition>
Palette entries every Level Designer offers, whichever module is designing: beside the editor's own shapes, as the Interface module's Text is. Offering them does not make this module a designer.
no setterinherited
sources → List<SourceConfig>?
Catalogs to read instead of the settings' (tests).
final
statusControls → List<StatusBarControl>
Controls added to the designer's status bar.
no setterinherited
tags → List<TagDefinition>
Tags this module's game code looks for by name — enemy, say. The project's tag list shows them as built in: they cannot be renamed or deleted there, since code would go on looking for the old name.
no setterinherited
themePresets → List<ThemePreset>
Palettes offered in the settings dialog beside the built-in accents.
no setterinherited
tiledObjectMappers → List<TiledObjectMapper>
What objects of an imported Tiled map become: a spawn point, a coin.
no setterinherited
toolbarButtons → List<ToolbarButton>
Buttons after the built-in play controls.
no setteroverride
toolGroups → List<ToolGroup>
Groups of the tool strip this module's tools go under, beside the editor's own (ToolGroups.builtIn).
no setterinherited
validators → List<SceneValidator>
Checks this module makes of the open scene, listed in the Problems dock beside the editor's own: a level with no spawn point, say.
no setteroverride
viewFactories → Map<SceneMode, EditorView Function(EditorScope scope)>
The views this module offers, by scene mode: what the viewport looks through while a scene of that mode is edited. A later module's wins; with none, the editor's own (GameCameraEditorView in 2-D, OrbitFlyEditorView in 3-D).
no setterinherited
viewportHandles → List<ViewportHandles>
Points it lets the author drag to edit the selected entity: a polygon's corners (see ViewportHandles).
no setterinherited
viewportOverlays → List<ViewportOverlay>
What it draws over the viewport while authoring, with the Level Designer open or not (see ViewportOverlay).
no setterinherited
workspaceContributions → List<WorkspaceContribution>
What it adds to windows — its own or others' (the editor's material windows: WorkspaceIds): tools on their toolbars, sections in their panels, overlays over their views. Each window builds them from the WorkspaceView it hands them.
no setterinherited
workspaces → List<WorkspaceDefinition>
Full-screen tools that take the viewport: a sprite editor, a dialogue graph. Opened with EditorScope.openWorkspace.
no setteroverride

Methods

controllerFor(EditorScope scope) → StoreController
The store's state for scope: one per editor session.
createSessionState(DesignerToolContext context) → Object?
State this module keeps per designer session — a route being edited, say. Tools reach it with context.stateOf<T>(); it survives a reload. Released through disposeSessionState.
inherited
createSnapProviders(DesignerToolContext context) → List<SnapProvider>
Ways of snapping, built fresh per session. Priority decides where they sit relative to the built-ins (entities 100, grid 0).
inherited
createTools(DesignerToolContext context) → List<LevelToolHandler>
Viewport tools, built fresh for each designer session. Ids should be prefixed to avoid colliding with built-ins; reusing a built-in's id replaces it.
inherited
dispose() → void
Called when the owning editor is disposed.
override
disposeSessionState(Object state) → void
Releases state, which createSessionState made: its session has closed, or this module has left it (another designer chosen). For state that holds signals, listeners or timers. Nothing by default.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onAssetChanged(String path) → void
A file in the project changed — saved by a tool, dropped in from outside. Whatever this module shows from it should show the new one.
override
onPlayStateChanged(bool playing) → void
A play-test started (true) or stopped (false).
inherited
onReassemble(EditorModuleContext context) → void
Called after each hot reload, before the editor reads this module's contributions again. For anything onRegister set up from code that may have changed — a loader it handed out, say — and must be done again. Must not undo what a play-test in progress relies on.
inherited
onRegister(EditorModuleContext context) → void
Called once, when this module joins an editor, after the built-ins are in place. One-time setup belongs here: loading files, installing into the engine, recovering from a crash. A hot reload does not call it again — see onReassemble.
override
onSceneOpened(String sceneName) → void
Called when a scene finishes loading.
inherited
onSceneSaving(String sceneName) → Future<void>
Called as scene sceneName is saved, before its file is written: for files of this module's own that the scene refers to — a terrain's heights — to be written with it. A throw is reported, and the scene is saved all the same.
inherited
onUpdate(double dt) → void
Called every editor tick.
inherited
restoreEditorData(DesignerSession session, Map<String, Object?> data) → void
Restores what saveEditorData wrote for this scene.
inherited
saveEditorData(DesignerSession session) → Map<String, Object?>?
What this module saves in the scene file's editor section, under its own id. Null saves nothing.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

make(EditorScope scope) → EditorModule
The module for scope: how the editor makes its built-ins.

Constants

moduleId → const String
Its id.
workspaceId → const String
The store window's id.