protected virtual void OnStartInspectorGUI()
        {
            EditorGUILayout.PropertyField(m_Script);

            EditorGUILayout.PropertyField(m_ChartName);
            EditorGUILayout.PropertyField(m_ThemeInfo, true);
            EditorGUI.BeginChangeCheck();
            EditorGUILayout.PropertyField(m_Background, true);

            var m_Show = m_Background.FindPropertyRelative("m_Show");

            if (m_Show.boolValue && !m_Target.CanShowBackgroundComponent())
            {
                EditorGUILayout.HelpBox("can't show background component:chart is control by LayoutGroup.", MessageType.Warning);
            }
            EditorGUILayout.PropertyField(m_Title, true);
            EditorGUILayout.PropertyField(m_Legend, true);
            EditorGUILayout.PropertyField(m_Tooltip, true);
        }
Example #2
0
        protected virtual void OnStartInspectorGUI()
        {
            EditorGUILayout.PropertyField(m_Script);

            EditorGUILayout.PropertyField(m_ChartName);
            EditorGUILayout.PropertyField(m_ThemeInfo, true);
            EditorGUI.BeginChangeCheck();
            EditorGUILayout.PropertyField(m_Background, true);

            var m_Show = m_Background.FindPropertyRelative("m_Show");
            if (m_Show.boolValue && !m_Target.CanShowBackgroundComponent())
            {
                var msg = "The background component cannot be activated because chart is controlled by LayoutGroup,"
                + " or its parent have more than one child.";
                EditorGUILayout.HelpBox(msg, MessageType.Error);
            }
            EditorGUILayout.PropertyField(m_Title, true);
            EditorGUILayout.PropertyField(m_Legend, true);
            EditorGUILayout.PropertyField(m_Tooltip, true);
        }