Separate level editor needs two AssetServers? #3402
Unanswered
stijnfrishert
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone,
I'm trying to build a simple level editor for my game's levels, and my initial plan is to create a separate app for this (instead of having it embedded in the game itself).
The editor would create/load a level with all its assets, but I'm running into issues with the
AssetServer
. The level files reside in anassets
folder in a different repo, and reference other assets in that same folder structure. When the editor'sAssetServer
tries to load these sub-assets (textures, sprites, etc.), it uses the editor'sAssetServer
and its root folder. It can't find the sub assets there, of course.As a solution I tried to create a separate
struct ProjectAssetServer(AssetServer)
and insert that as a resource into the app too, but it then doesn't know about any of the registered loaders. Even if I add those manually, it feels like I'm doing something I shouldn't in Bevy.Since this mimics the idea of a future official Bevy editor built with Bevy, and since I'm sure there's more people building rudimentary editors for their games, I thought to ask here.
Beta Was this translation helpful? Give feedback.
All reactions