Example #1
0
        private void OnGUI()
        {
            EditorGUI.BeginDisabledGroup(true);
            srpgData = (EditorSrpgData)EditorGUILayout.ObjectField("SRPG Data Editor", srpgData, typeof(EditorSrpgData), false);
            EditorGUI.EndDisabledGroup();
            if (srpgData == null || m_SerializedObject == null)
            {
                EditorGUILayout.HelpBox("Please re-open a SRPG Data Editor Window.", MessageType.Info);
                return;
            }

            m_SerializedObject.Update();

            // 绘制选择类型
            SerializedProperty curConfigTypeProperty = m_SerializedObject.FindProperty("currentConfig");

            EditorGUILayout.PropertyField(curConfigTypeProperty, true);
            EditorGUILayout.Space();

            // 绘制按钮
            if (!DoDrawButtons())
            {
                return;
            }

            // 绘制数据
            if (!DoDrawDatas())
            {
                return;
            }
        }
Example #2
0
 private void OnDestroy()
 {
     this.srpgData = null;
     s_Window      = null;
 }