# Bevy editor foundations Discussion starting at https://discord.com/channels/691052431525675048/789987800014651412/797205984027607060 ## Scene editing When editing scene files the scene file changes and the world state need to be merged in a sane way. If a scene file removes an entity it shouldn't be kept in the world, but if the app changes an entity and the scene file doesn't change said entity, the world state needs to be preserved. Relevant: https://github.com/kabergstrom/prefab ## Live reloading For live reloading the whole app will need to be restarted, but the changes to the world state need to be applied to the world of the new app. This is similar to scene editing, but what to use as "scene" is less clear. It could be the world state just after all startup systems have run, but that would miss changed scenes and the app may still do "startup" work after all startup systems have run. For example when clicking start in a main menu, the real game will be started. ## App embedding An editor will likely want to embed the game within the editor window. An editor will likely also want to keep the game itself in another process. This will require a way to send events to an embedded `App` and receive window contents from the app. This will need a form of ipc. As fallback it could send the events and rendered images over stdin/stdout, but for more performance there will likely need to be a way to share the render target of the embedded app with the editor process in a platform dependent way. https://github.com/servo/surfman seems to be what we need, but currently only supports OpenGL and not Vulkan. ## Editor api TODO # Misc editor features ## Warning/error reporting See discussion around https://discord.com/channels/691052431525675048/749335865876021248/799611183409528893 ## Visualize schedules This should show all dependencies and likely potentially ambiguous orderings. See discussion around https://discord.com/channels/691052431525675048/749335865876021248/799765349792612402 ## Show all resources Both global and system local. ## Quick editors for specified values Something like <https://github.com/jakobhellermann/bevy-inspector-egui> # Potential inspiration sources * [Unity](https://unity.com/) * [Godot](https://godotengine.org/) * [rg3d](https://github.com/mrDIMAS/rg3d) * [Hazel](https://www.youtube.com/watch?v=8zVtRpBTwe0&list=PLlrATfBNZ98dC-V-N3m0Go4deliWHPFwT&index=94) (youtube series coding a game engine) * [ct.js](https://comigo.itch.io/ct) (2d only engine) * [Our Machinery](https://ourmachinery.com/product.html) (suggestion by @alice-i-cecile)