NSMutableAttributedStringこれには使用できないと確信していますNSAttributedString。私が試したことは次のとおりです。
NSMutableAttributedString * newString = [[NSMutableAttributedString alloc] initWithString:@"firstsecondthird"];
[newString addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(0,5)];
[newString addAttribute:NSForegroundColorAttributeName value:[UIColor greenColor] range:NSMakeRange(5,6)];
[newString addAttribute:NSForegroundColorAttributeName value:[UIColor blueColor] range:NSMakeRange(11,5)];
labelNode.text = [newString string];
これは機能せず、テキストはまだ元の色のままです。これを行う方法はありますSKLabelNodeか?複数を使用するSKLabelNodesことは解決策ですが、エレガント(またはパフォーマンス)とは言えません。