R_C
R_C

Reputation: 353

Swift Outlined SKLabelNodes

I am making a game with SpriteKit's framework. How would I make an outlined text with SKLabelNodes? There doesn't seem to be a built in function of doing this. If there is no way to do it within SpriteKit, what other ways could I approach this?

Upvotes: 1

Views: 138

Answers (1)

R_C
R_C

Reputation: 353

Ok, so I didn't know how to implement UILabels or NSAttributedLabelNodes onto a SpriteKit GameScene, so I just put 4 SKLabels in black behind the original SKLabel (same font size). I then adjusted the 4 black SKLabels, one going a little to the left (relative to the original label), a little to the right, a little up, a little down. This gave an outlining illusion. Pretty bootleg solution but it works. Hopefully SpriteKit implements a better built in option!

Hope this helps someone!

Upvotes: 2

Related Questions