Beispiel #1
0
    public override void OnInspectorGUI()
    {
        if (SeeInspector.boolValue)                         // If true Default Inspector is drawn on screen
        {
            DrawDefaultInspector();
        }

        serializedObject.Update();

        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("See Inspector :", GUILayout.Width(85));
        EditorGUILayout.PropertyField(SeeInspector, new GUIContent(""), GUILayout.Width(30));
        EditorGUILayout.EndHorizontal();

        GUIStyle style_Yellow_01     = new GUIStyle(GUI.skin.box); style_Yellow_01.normal.background = Tex_01;
        GUIStyle style_Blue          = new GUIStyle(GUI.skin.box); style_Blue.normal.background = Tex_03;
        GUIStyle style_Purple        = new GUIStyle(GUI.skin.box); style_Purple.normal.background = Tex_04;
        GUIStyle style_Orange        = new GUIStyle(GUI.skin.box); style_Orange.normal.background = Tex_05;
        GUIStyle style_Yellow_Strong = new GUIStyle(GUI.skin.box); style_Yellow_Strong.normal.background = Tex_02;

        CT_TheEnd myScript = (CT_TheEnd)target;

        serializedObject.ApplyModifiedProperties();

        EditorGUILayout.LabelField("");
    }
Beispiel #2
0
    void OnEnable()
    {
        // Setup the SerializedProperties.
        SeeInspector = serializedObject.FindProperty("SeeInspector");

        CT_TheEnd myScript = (CT_TheEnd)target;


        Tex_01 = MakeTex(2, 2, new Color(1, .8f, 0.2F, .4f));
        Tex_02 = MakeTex(2, 2, new Color(1, .8f, 0.2F, .4f));
        Tex_03 = MakeTex(2, 2, new Color(.3F, .9f, 1, .5f));
        Tex_04 = MakeTex(2, 2, new Color(1, .3f, 1, .3f));
        Tex_05 = MakeTex(2, 2, new Color(1, .5f, 0.3F, .4f));
    }