-
Notifications
You must be signed in to change notification settings - Fork 106
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
Support easy loading of textures from an asset catalog #150
Comments
I can get down with this. 🙂 |
Looks like we have run out of luck with this one: asset catalog is compiled as Assets.car file. That file is Apple's proprietary format which could be opened with CUICatalog, which is private class. If we use private class, it is very likely that apps with this will not be passed through AppStore review process. 🧐 |
@jussi80 I don't think we should attempt to parse the asset catalogs ourselves. There's the |
@JohnSundell NSDataAsset seems to read everything else than image data which is rather strange. Taken from NSDataSet file
I added images and some random json filled files to .xcassets and images can't be opened, but those json files are no problem with the NSDataAsset. 🤔 |
Since Imagine Engine doesn't rely on the default system image loading mechanism (using
UIImage(named:)
on iOS) loading textures from an asset catalog is not super easy. While possible it requires you to createAnimation
orTexture
instances usingImage
, like this:It would be nicer if Imagine Engine could automatically search the app's asset catalog for an image with a given name, so that you could simply use:
The text was updated successfully, but these errors were encountered: