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 || serializedObject == null)
            {
                EditorGUILayout.HelpBox("Please re-open a SRPG Data Editor Window.", MessageType.Info);
                return;
            }

            serializedObject.Update();

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

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

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

            // 绘制数据
            if (!DoDrawDatas())
            {
                return;
            }
        }
Example #2
0
 private void OnDestroy()
 {
     SRPGData = null;
     window   = null;
 }