Beispiel #1
0
        public HierarchyStyle(string prefix, string name, ModeOptions lightMode, ModeOptions darkMode)
        {
            this.prefix = prefix;
            this.name   = name;

            modes = new ModeOptions[]
            {
                lightMode,
                darkMode
            };
        }
        public static void DrawHierarchyStyle(HierarchyStyle style, Rect styleRect, Rect labelRect, string label, bool removePrefix = true)
        {
            if (removePrefix)
            {
                label = label.Substring(style.prefix.Length).Trim();
            }

            ModeOptions styleSetting = style.GetCurrentMode(EditorGUIUtility.isProSkin);

            EditorGUI.DrawRect(styleRect, styleSetting.backgroundColour);
            EditorGUI.LabelField(labelRect, label.ToUpper(), style.style);
        }