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 am using a third-party loader to create BitmapTextures and manually adding them to an AssetBundle.
However, when manually creating an instance of NamedAssetBase, its _namespace property is null, rather than DEFAULT_NAMESPACE.
I've found this to cause issues with AssetLibraryBundle further down the line when manually adding and removing assets: i.e. in AssetLibraryBundle.addAsset(), if the asset's namespace is null it is added to the dictionary's DEFAULT_NAMESPACE ("default"). However, in AssetLibraryBundle.removeAssetFromDict() the assets namespace isn't defaulted, and therefore the asset is not found and not removed.
I've found a workaround, which is to call texture.resetAssetPath(texture.name, NamedAssetBase.DEFAULT_NAMESPACE, false); before adding it to the bundle, but this shouldn't have to be the case.
The text was updated successfully, but these errors were encountered:
esidegallery
changed the title
NamedAssetBase's namespace should be DEFAULT_NAMESPACE by default
NamedAssetBase's namespace should be DEFAULT_NAMESPACE by default (or AssetLibrary.removeAssetFromDict() should auto-default)
May 21, 2014
I am using a third-party loader to create BitmapTextures and manually adding them to an AssetBundle.
However, when manually creating an instance of NamedAssetBase, its _namespace property is
null
, rather thanDEFAULT_NAMESPACE
.I've found this to cause issues with AssetLibraryBundle further down the line when manually adding and removing assets: i.e. in
AssetLibraryBundle.addAsset()
, if the asset's namespace isnull
it is added to the dictionary'sDEFAULT_NAMESPACE
("default"). However, inAssetLibraryBundle.removeAssetFromDict()
the assets namespace isn't defaulted, and therefore the asset is not found and not removed.I've found a workaround, which is to call
texture.resetAssetPath(texture.name, NamedAssetBase.DEFAULT_NAMESPACE, false);
before adding it to the bundle, but this shouldn't have to be the case.The text was updated successfully, but these errors were encountered: