Exemple #1
0
    public override void OnInspectorGUI()
    {
        if (m_obj == null)
        {
            return;
        }

        if (m_style == null)
        {
            m_style = new EditorStyle();
            m_style.SetupStyle();
        }

        #region Section -> Logo

        if (m_logoTexture != null)
        {
            GUILayout.Label
            (
                image: m_logoTexture,
                style: new GUIStyle(GUI.skin.GetStyle("Label"))
            {
                alignment = TextAnchor.UpperCenter
            }
            );

            GUILayout.Space(Float.Five);
        }
        else
        {
            EditorGUILayout.LabelField(label: "[ MOTION - SYSTEM ]");
        }

        #endregion

        DrawErrors();
        serializedObject.Update();

        if (m_obj.Ready)
        {
            //DrawMotionAssetOptions();
            DrawAnimatorOptions();
            DrawAnimatorSettings();
        }
        else
        {
            if (!m_obj.CanEditSkeleton)
            {
                m_obj.CanEditSkeleton = true;
            }
        }

        DrawBoneSettings();
        serializedObject.ApplyModifiedProperties();
        //DrawDefaultInspector();
    }
    public override void OnInspectorGUI()
    {
        #region Logo

        if (m_logoTexture != null)
        {
            GUILayout.Label
            (
                image: m_logoTexture,
                style: new GUIStyle(GUI.skin.GetStyle("Label"))
            {
                alignment = TextAnchor.UpperCenter
            }
            );

            GUILayout.Space(Float.Five);
        }
        else
        {
            EditorGUILayout.LabelField(label: "[ MOTION - SYSTEM ]");
        }

        #endregion

        if (m_style == null)
        {
            m_style = new EditorStyle();
            m_style.SetupStyle();
        }

        m_style.DrawTitleBar("Motion Data");

        EditorGUILayout.BeginVertical(m_style.LightBlueBox);
        m_label.text = "Animations";
        EditorGUILayout.PropertyField(serializedObject.FindProperty("MotionCount"), m_label);
        EditorGUILayout.EndVertical();

        EditorGUILayout.BeginVertical(m_style.BlueBox);
        m_label.text = "Moviment Animations";
        EditorGUILayout.PropertyField(serializedObject.FindProperty("MovingCount"), m_label);
        EditorGUILayout.EndVertical();

        EditorGUILayout.BeginVertical(m_style.BlackBox);
        m_label.text = "Stationary Animations";
        EditorGUILayout.PropertyField(serializedObject.FindProperty("StationaryCount"), m_label);
        EditorGUILayout.EndVertical();
    }