After creating a new "Augment Reality App" project in Xcode, I want to move art.scnassets
folder from its default location to /Resources/
folder that I created. So the folder path would be like Resources/art.scnassets
. However, it fails to load a png file in it if I move the folder. See below:
Before (working):
// art.scnassets folder is in its default place
// below code loads image.png
print(UIImage(named: "art.scnassets/image.png")!)
After (not working):
// moved folder to "Resources/art.scnassets"
// Resources folder is a group.
// below returns `nil`
print(UIImage(named: "Resources/art.scnassets/image.png")!)
I cleaned up the builds, and checked Copy Bundle Resources
menu as well, but there is nothing wrong. If I move art.scnassets
folder back to the project root, it works, meaning code works fine.
What should I do to move art.scnassets
to somewhere else? I am new to Swift.