This post is copied from the bevy_editor_prototypes
discussions forum. Please see the original post for replies and potential edits.
A few days ago I brainstormed what a Bevy VSCode extension could do, and these are my (slightly disorganized) thoughts. If you particularly like / dislike a feature, or want to discuss, please feel free in the comments below!
Snippets are the equivalent of multi-line autocomplete. It would be quite easy to support snippets for:
App::new().run()
in this case.Systems may also be possible, but more difficult.
I can see many scenarios where it would be useful to extract information from a the App
:
PluginGroup
s added which plugins.Location
), then you could automatically jump to the file and line number of a system.Startup
schedule.)One possible solution to accomplish this task could be:
VSCodePlugin
and manually add it to the App
.bevy-vscode/debug-introspection
flag is enabled, the plugin will collect a bunch of data and save it to a JSON file within target/bevy-vscode
. It will then call std::process::exit(0)
.I could see a system editor that auto-discovers system parameters within your function body. I'm not sure how this could be accomplished, but it may be useful for automating the repetitive aspects of systems.
This may be stepping into Blender's territory, but it should be possible to create a PBR editor view that can then export the code into your editor. In the future this could also load existing material definitions, though that may require a Rust interpreter.
Quite often I find myself copying over Bevy's examples, but it takes quite a lot of navigation to get to the correct branch. It would be really nice to have a VSCode command that can automatically download and run these examples for you, detecting the Bevy version in Cargo.toml
.
It seems I just can't escape feature flags… :P
When preparing a game for production, it is common to disable all of Bevy's features and manually specify the ones needed. While this is probably out of scope, it would be nice to automate this by progressively removing features and testing if the code still compiles. It would probably need some hard-coded feature information (especially for file format features), but it would be handy.
So yeah, these are a few of my ideas that may actually be useful. I think the easiest to implement are snippets and the example runner, though app introspection would be the most useful.
Please tell me your thoughts, I'm curious what you all think of this!