コード例 #1
0
        public static GUIStyle FontStyle(this GUIStyle current, string value, bool asCopy = true)
        {
            value = value.ToLower();
            var fontStyle = current.fontStyle;

            if (value == "normal")
            {
                fontStyle = UnityEngine.FontStyle.Normal;
            }
            if (value == "bold")
            {
                fontStyle = UnityEngine.FontStyle.Bold;
            }
            if (value == "italic")
            {
                fontStyle = UnityEngine.FontStyle.Italic;
            }
            if (value == "boldanditalic")
            {
                fontStyle = UnityEngine.FontStyle.BoldAndItalic;
            }
            return(current.FontStyle(fontStyle, asCopy));
        }