- Home /
This question was
closed May 14, 2015 at 05:37 PM by
barbe63 for the following reason:
Duplicate Question
Need help with fonts cache
Hello,
I'm struggling against the huge spikes I'm having on my game due to Font.CacheFontForText. I have seens some threads about that and I found some code I tried to adapt on mine, so I did:
public Font jackCandleStick;
public Font timerFont;
private static readonly string glyphs= "0123456789+: "; // all the characters I need
in the class and in the awake I have:
for (int index= 0; (index < glyphs.Length); ++index)
{
jackCandleStick.RequestCharactersInTexture(
glyphs[index].ToString(),
jackCandleStick.fontSize, FontStyle.Normal);
timerFont.RequestCharactersInTexture(
glyphs[index].ToString(),
timerFont.fontSize, FontStyle.BoldAndItalic);
}
but I don't see any impact, the spikes are still there so I guess I'm doing something wrong. I don't really understand how this is working so please help me!
Thanks.
Comment
I try a last bump before close and ask elsewhere... Someone please?
Follow this Question
Related Questions
Blurry fonts, even when using DX11 0 Answers
Graphic glitch on UI Text 0 Answers
How can I achieve advanced text effects? 1 Answer
Unity5, new UI, fonts .. kerning 1 Answer