Closed janhohenheim closed 1 year ago
@janhohenheim Can you explain the solution? I currently don't see what the problem was
In my use case, the grass is spawned at some random point during the game. So, before that, for instance_data in cache.values_mut()
ran a noop and instance_data.uniform_bindgroup
was left at None
. Later on, this is not updated because of the early return, so it stayed at None
forever. This change makes sure that the last_texture_id
stays at None
until we actually spawned anything, so that the early return cannot be triggered.
Ok sure thanks. Seems a bit hacky but totally fine for now
Discovered this one while lazily loading grass from a tag I put on a GLTF.