Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NamedAssetBase's namespace should be DEFAULT_NAMESPACE by default (or AssetLibrary.removeAssetFromDict() should auto-default) #698

Open
esidegallery opened this issue May 21, 2014 · 0 comments

Comments

@esidegallery
Copy link

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.

@esidegallery 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant