Skip to content

tools: project-browser: reveal newly created and imported resources#774

Merged
dbartolini merged 1 commit intocrownengine:masterfrom
KaindraDjoemena:master
Mar 7, 2026
Merged

tools: project-browser: reveal newly created and imported resources#774
dbartolini merged 1 commit intocrownengine:masterfrom
KaindraDjoemena:master

Conversation

@KaindraDjoemena
Copy link
Contributor

After creating or importing a resource, the project browser now
automatically reveals it.

Resource creation (scripts, units, materials, state machines) was
wired up via compile_and_reveal_resource(). Newly created folders
are also auto-expanded in the project browser.

For imports, the Import delegate signature was extended to pass back
the path of the primary output resource:

public delegate void Import(ImportResult result, string? primary_resource_path = null);

Each importer passes back its primary output on success:

  • Texture → .texture
  • Sound → .sound
  • Font → .font
  • Sprite → .unit
  • Mesh (.mesh) → .unit
  • FBX → .unit

on_import_result() then calls compile_and_reveal_resource() so both
creation and import share the same reveal path.

Closes #201

@dbartolini dbartolini merged commit 82ffdb4 into crownengine:master Mar 7, 2026
6 checks passed
@dbartolini
Copy link
Collaborator

Note for future PRs: you could have force-pushed to #771. It's less work for both of us. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tools: project-browser: automatically select newly created resources

2 participants