Counting Asset<Mesh> for diagnostics/statistics pane #13296
Unanswered
johnny-smitherson
asked this question in
Q&A
Replies: 1 comment
-
meshes that are marked as |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to figure out how many resources of each type there are inside
Res<Assets<X>>
, to display these in a diagnostics pane.This works great for Image and StandardMaterial, but for Mesh (which I create dynamically about 1300) the count is wrong.
It seems to only count the meshes that come from standard Bevy shapes:
But not counting the ones I create from scratch:
All 1300 meshes are in the scene. If I count
Query<Handle<Mesh>>
the count is correct -- but that count gives back number of entities with a mesh, not number of distinct meshes, which is what I want. And if I computed the uniqueHandle<Mesh>
inside the system, then the resulting count wouldn't include meshes that are not inserted on any Entities but are still held somewhere (e.g. inside another resource).Any idea what's happening wrong with this count? Is this a bug, or a feature?
Beta Was this translation helpful? Give feedback.
All reactions