You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that when I load an asset directly via Asset<A>::add(some_object) that, although I can retrieve the object via Asset<A>::get(handle.id()), that AssetServer seems to have no knowledge of this asset's status.
I would have assumed that it would immediately flag as loaded, but asset_server.is_loaded(handle.id()) returns false, asset_server.load_state(handle.id()) returns LoadState::NotLoaded, and asset_server.get_load_state(handle.id()) returns None.
This same type does report loading/loaded/failed/etc when I load it via an asset path passed to asset_server.load(..) though.
Am I misunderstanding the intent here? Should I avoid mixing implicitly declared and deserialized versions of the same asset type?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I noticed that when I load an asset directly via
Asset<A>::add(some_object)
that, although I can retrieve the object viaAsset<A>::get(handle.id())
, that AssetServer seems to have no knowledge of this asset's status.I would have assumed that it would immediately flag as loaded, but
asset_server.is_loaded(handle.id())
returns false,asset_server.load_state(handle.id())
returnsLoadState::NotLoaded
, andasset_server.get_load_state(handle.id())
returnsNone
.This same type does report loading/loaded/failed/etc when I load it via an asset path passed to
asset_server.load(..)
though.Am I misunderstanding the intent here? Should I avoid mixing implicitly declared and deserialized versions of the same asset type?
Beta Was this translation helpful? Give feedback.
All reactions