コード例 #1
0
        protected virtual void OnStartInspectorGUI()
        {
            BlockStart();
            EditorGUILayout.BeginHorizontal();
            var version = string.Format("v{0}_{1}", XChartsMgr.version, XChartsMgr.versionDate);

            if (m_EnableTextMeshPro.boolValue)
            {
                version += " TMP";
            }
            EditorGUILayout.LabelField(version);

            if (GUILayout.Button("Github"))
            {
                Application.OpenURL("https://github.com/monitor1394/unity-ugui-XCharts");
            }
            EditorGUILayout.EndHorizontal();
            BlockEnd();

            BlockStart();
            m_BaseFoldout = EditorGUILayout.Foldout(m_BaseFoldout, "Base", true);
            if (m_BaseFoldout)
            {
                EditorGUILayout.PropertyField(m_Script);
                EditorGUILayout.PropertyField(m_ChartName);
            }
            BlockEnd();
            var fileds = m_Chart.GetCustomChartInspectorShowFileds();

            if (fileds != null && fileds.Length > 0)
            {
                BlockStart();
                m_CustomFoldout = EditorGUILayout.Foldout(m_CustomFoldout, "Custom", true);
                if (m_CustomFoldout)
                {
                    foreach (var filed in fileds)
                    {
                        EditorGUILayout.PropertyField(serializedObject.FindProperty(filed));
                    }
                }
                BlockEnd();
            }
            BlockField(m_Theme);
            BlockField(m_Settings);
            BlockField(m_Background);

            m_ShowAllComponent = m_MultiComponentMode.boolValue;
            BlockListField(m_ShowAllComponent, m_Titles);
            BlockListField(m_ShowAllComponent, m_Legends);
            BlockListField(m_ShowAllComponent, m_Tooltips);
            BlockListField(m_ShowAllComponent, SerieType.Liquid, m_Vessels);
            BlockListField(m_ShowAllComponent, SerieType.Radar, m_Radars);
        }