bevy
bevy copied to clipboard
Cannot access `WgpuAdapterInfo` anymore?
Bevy version
0.9
What you did
Upgrading from v0.8.
The documentation of WgpuSettings still claims to use "the WgpuAdapterInfo resource", but WgpuAdapterInfo is not a resource since it's an alias for a WGPU type and it probably lost the default Resource implementation.
What went wrong
Doesn't build.
// the trait bound `WgpuAdapterInfo: bevy::prelude::Resource` is not satisfied
let adapter_name = app
.world
.get_resource::<WgpuAdapterInfo>()
.map(|ai| &ai.name[..])
.unwrap();
Note: WgpuAdapterInfo doesn't appear in the migration guide https://bevyengine.org/learn/book/migration-guides/0.8-0.9/
The AdapterInfo is now wrapped in the RenderAdapterInfo Resource.
Confirmed working with RenderAdapterInfo. Do we / can we upgrade the migration guide for it maybe?