Hey,
I have a multiline SKLabelNode in SpriteKit created with the following code...
body = [SKLabelNode labelNodeWithText:@"hello\ngoodbye\npeace"];
body.horizontalAlignmentMode = SKLabelHorizontalAlignmentModeCenter;
body.fontSize = 18;
body.numberOfLines = 3;
body.preferredMaxLayoutWidth = 300;
body.fontColor = color;
body.zPosition = 3;
When using "\n" as a linebreak, the labelnode is no longer centered. Without the custom linebreaks, it will still create a multiline label and be centered. Is there anyway to create manual linebreaks while still centering the label?
Thanks,
-Xhale