We have different images for iPhones and iPads, but the Particle Emitter Editor in Xcode only seems to use the iPhone images -- even on iPad devices.
We also tried changing the texture in code like this:
emitterNode.particleTexture = SKTexture(imageNamed: "Test.png")
We have an image named "Test@2x~ipad.png". This is the iPad version of the image.
The iPhone version is named "Test@2x.png".
Is automatically using different images for different devices not possible with SKEmitterNodes, or are we doing something wrong?
Instead of calling SKTexture(imageNamed: "Test.png")
, call SKTexture(image: UIImage(named: "Test"))
. The call to UIImage(named:)
will obey the bundle resource naming conventions.