I want to create a circle whose content is an image (.png), and based on the SKShapeNode class reference, I thought I could use the SKShapeNode.filltexture () function to set the texture on the image. But when I run the code below, I get a circle, but the "cat-black" image that I am trying to load is not displayed. I checked that my Image.Assets has an image with the correct name, so there is something else. Any ideas? I added the following result:
func newCircle(photo:String, position:CGPoint) -> SKShapeNode { let circle = SKShapeNode.init(circleOfRadius: 27) circle.fillTexture = SKTexture.init(image: UIImage(named: "cat-black")!) circle.strokeColor = UIColor.greenColor() circle.lineWidth = 4 circle.name = "aggroNode" circle.position = position return circle }

source share