This commit is contained in:
CortexCore
2023-10-20 19:31:12 +08:00
parent 5cd094ed9a
commit a160813262
1878 changed files with 630581 additions and 4485 deletions

View File

@@ -0,0 +1,40 @@
using UnityEngine;
using UnityEditor;
using System.Collections;
namespace MeshCombineStudio
{
[CustomEditor (typeof(ReadMe))]
public class ReadMeEditor : Editor
{
public override void OnInspectorGUI()
{
ReadMe r = (ReadMe)target;
Event eventCurrent = Event.current;
GUI.changed = false;
if (eventCurrent.control && eventCurrent.shift && eventCurrent.keyCode == KeyCode.E && eventCurrent.type == EventType.KeyDown)
{
r.buttonEdit = !r.buttonEdit;
GUI.changed = true;
}
GUILayout.Space(5);
if (r.buttonEdit)
{
EditorGUILayout.LabelField("EDIT MODE");
r.readme = EditorGUILayout.TextArea(r.readme);
}
else
{
EditorGUILayout.TextArea(r.readme);
}
if (GUI.changed) EditorUtility.SetDirty(target);
}
}
}