I am making a game using Xcode, Swift and SpriteKit. I made a PNG image in Photoshop that implies transparency, and in the game it looks black. I have other png images that also include transparency and they look the way they are supposed to. I do not think that this is a problem with the code, but just in case, here is the code that introduces the image into the game (it is inside the function didMoveToView):
let warning = SKSpriteNode(imageNamed: "yellow_warning")
warning.setScale(0.1)
warning.anchorPoint = CGPoint(x: 0, y: 0.5)
warning.position = CGPoint(x: CGRectGetMinX(self.scene!.frame)+296, y: CGRectGetMidY(self.scene!.frame))
warningsNode.addChild(warning)
warningsNodeis simple SKNodeand is a child of the scene.
Here is the image I'm using

Thank you for your help!
source
share