SKLabelNode delays app start

后端 未结 3 1388
孤城傲影
孤城傲影 2021-01-12 16:33

at the moment I\'m coding a little app with SpriteKit, which works perfectly fine, but the only problem is an SKLabelNode, which I initialize with the following normal piece

3条回答
  •  渐次进展
    2021-01-12 16:55

    Actually, you don't need to preload the font for an SKLabelNode. The delay is caused by the fact that you're using the wrong font name. There's no "Futura" font on iOS - what you probably mean is "Futura-Medium". Replace "Futura" with "Futura-Medium", and you should see the load time drastically fall.

    (You can still preload your fonts, but it's not necessary; lazy loading is pretty fast provided you use a correct font name.)

提交回复
热议问题