示例#1
0
            static Style()
            {
                normalLabelStyle = new GUIStyle(EditorStyles.miniLabel)
                {
#if UNITY_2019_3_OR_NEWER
                    fontSize = 9
#else
                    fontSize = 8
#endif
                };

                layerLabelStyle = new GUIStyle(EditorStyles.miniLabel)
                {
#if UNITY_2019_3_OR_NEWER
                    fontSize = 9,
#else
                    fontSize = 8,
#endif
#if UNITY_2019_3_OR_NEWER
                    alignment = TextAnchor.MiddleCenter
#else
                    alignment = TextAnchor.UpperCenter
#endif
                };

                remarkLabelStyle = new GUIStyle(EditorStyles.centeredGreyMiniLabel);
                headerLabelStyle = new GUIStyle(EditorStyles.boldLabel)
                {
                    alignment = TextAnchor.MiddleCenter
                };
                selectLabelStyle = new GUIStyle(EditorStyles.centeredGreyMiniLabel)
                {
                    alignment     = TextAnchor.MiddleRight,
                    contentOffset = new Vector2()
                    {
                        x = -2.0f
                    }
                };

                backgroundStyle = new GUIStyle();
                backgroundStyle.normal.background = EditorGuiUtility.CreateColorTexture(labelColor);

                componentIcon = EditorGUIUtility.IconContent("cs Script Icon").image;
                transformIcon = EditorGUIUtility.IconContent("Transform Icon").image;
            }
        }
    }
示例#2
0
            static Style()
            {
                headerLabelStyle = new GUIStyle(EditorStyles.boldLabel)
                {
                    alignment = TextAnchor.MiddleCenter
                };
                remarkLabelStyle = new GUIStyle(EditorStyles.centeredGreyMiniLabel);
                selectLabelStyle = new GUIStyle(EditorStyles.centeredGreyMiniLabel)
                {
                    alignment     = TextAnchor.MiddleRight,
                    contentOffset = new Vector2()
                    {
                        x = -2.0f
                    }
                };

                backgroundStyle = new GUIStyle();
                backgroundStyle.normal.background = EditorGuiUtility.CreateColorTexture(labelColor);
            }