UnityEngine.UI.Text.AssignDefaultFont C# (CSharp) Method

AssignDefaultFont() private method

private AssignDefaultFont ( ) : void
return void
        internal void AssignDefaultFont()
        {
            this.font = UnityEngine.Resources.GetBuiltinResource<Font>("Arial.ttf");
        }

Usage Example

示例#1
0
        private static void SetDefaultTextValues(Text lbl)
        {
            // Set text values we want across UI elements in default controls.
            // Don't set values which are the same as the default values for the Text component,
            // since there's no point in that, and it's good to keep them as consistent as possible.
            lbl.color = s_TextColor;

            // Reset() is not called when playing. We still want the default font to be assigned
            lbl.AssignDefaultFont();
        }
All Usage Examples Of UnityEngine.UI.Text::AssignDefaultFont