Hi guys.
I am having problems with this line of code:
let background = SKSpriteNode(imageNamed: "Background")
The image's name is correct, and it is inside a folder called Fuentes/Art/backgrounds.atlas
I tried too this option:
let atlas = SKTextureAtlas(named: "backgrounds")
let texture = atlas.textureNamed("Background")
let background = SKSpriteNode(texture: texture)
But then, it says: Texture Atlas 'backgrounds' cannot be found.
Any suggestions?
PD: I made triple check on every denomination for every name.
What you suggested gave me a good idea and I solved it. I didn't what you tell me, but I decided to put the files inside Assets.xcassets directly and everything worked perfect. Even better, if you right-click over it you can create your new Sprite Atlas and put inside the elements that you want. So, this is the new way of doing things (at least at the moment).