-
-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.13.0 no longer works with renderless Bevy #152
Comments
After further examination, it should also be said that v0.13.0 relies on render plugins to be added to the Bevy app or it will panick. So it is more than dependencies on the just Rust crates alone. v0.12.0 Ran perfectly fine with only just these Bevy plugins: Trying to run a Bevy app with physics without
|
I think this comes from the fact that we use |
You can have best of both worlds. By inserting a WgpuSettings ressource with its backend field set to None before adding the bevy RenderPlugin, you'll get full initialization of bevy without any rendering context. This has been made possible with the sub_apps, as the render_app won't be added to bevy runtime if it has no wgpu backend set. Edit: You'll also need some default plugin config else you won't meet dependencies for the render plugin.
|
Thank you @sethquantix this works, my project is once again renderless and is now initialized the way you've described! However, requiring |
You don't actually need to have the plugins running so can use this to disable them: // Bevy 0.8
app.add_plugins_with(DefaultPlugins, |group| {
group.disable::<RenderPlugin>().disable::<WindowPlugin>()
});
// Bevy 0.9
app.add_plugins(
DefaultPlugins
.build()
.disable::<RenderPlugin>()
.disable::<WindowPlugin>()
);
// For 3D you also need to manually add the MeshPlugin
app.add_plugin(MeshPlugin); Using these dependencies. [dependencies]
bevy = {version = "0.9.0", default-features = false, features = ["bevy_render"]}
bevy_rapier2d = {version = "0.19.0", default-features = false, features = ["dim2", "simd-stable"]} This removes the runtime dependency on a GPU which I needed as just changing the window settings still causes a panic on some systems. |
Since Bevy 0.9.0 and bevy_rapier3d 0.19.0 I haven't been able to disable the GPU Bevy plugins. @MJohnson459 Your setup doesn't work for me and throws the following error:
Reproduction bevy_rapier_renderless.zip |
@starwolfy sorry I was using 2D. It seems like 3D has an extra runtime dependency I can't get rid of either. Edit: I updated the example with it working in 3D as well. It was just missing the |
@MJohnson459 Thank you for the swift response and updated solution. Does your updated solution work for you on the reproduction project? It doesn't work for me, it continues to complain about more missing plugins all the way until it requires the Render plugin again. |
@starwolfy yes it worked for me. Did you limit the bevy dependency to remove the default features? |
It works, thanks a bunch!! |
The following cargo.toml configuration does not build anymore:
bevy_rapier3d = {version= "0.13.0" ,default-features = false, features = [ "dim3" ]}
Build output:
Reproduction:
rapier-renderless.zip
The text was updated successfully, but these errors were encountered: