NiklasEi / bevy_asset_loader

Bevy plugin helping with asset loading and organization
Apache License 2.0
452 stars 53 forks source link

How to get Asset from a given Handle #154

Closed PraxTube closed 8 months ago

PraxTube commented 9 months ago

I am trying to get the asset data that is behind a handle, but I can't figure out how to achieve that. The Assets::get() function is what you would typically use, but that doesn't work too nicely with the AssetLoader, at least I don't see how.

Any ideas how to get the Asset from a Handle?

NiklasEi commented 8 months ago

but that doesn't work too nicely with the AssetLoader,

Are you writing an asset loader or what is your use case?

PraxTube commented 8 months ago

What I wanted to do was essentially this, getting the Asset data that is behind a Handle. Which is exactly what I tried but somehow I thought it didn't work for whatever reason. Sorry for wasting your time, and thank you for trying to help :+1: