先修复一下,错误的场景 删除不必要的钓场资产 修复into场景 update:更新meta文件,修复报错 update:修复资源 修复第一章节建造 修复建造第三章 update:删除多余内容 update:更新README.md update:还原图标 update:更新README update:更新配置
42 lines
1.0 KiB
C#
42 lines
1.0 KiB
C#
using UnityEngine;
|
|
using System.Collections;
|
|
using UnityEditor;
|
|
|
|
namespace RootMotion {
|
|
|
|
[CustomEditor(typeof(Comments))]
|
|
public class CommentsInspector : Editor {
|
|
|
|
private Comments script { get { return target as Comments; }}
|
|
private GUIStyle style = new GUIStyle();
|
|
|
|
// Black and white
|
|
//private static Color pro = new Color(0.7f, 0.7f, 0.7f, 1f);
|
|
//private static Color free = new Color(0, 0, 0, 1);
|
|
|
|
// Colors
|
|
private static Color pro = new Color(0.5f, 0.7f, 0.3f, 1f);
|
|
private static Color free = new Color(0.2f, 0.3f, 0.1f, 1f);
|
|
|
|
public override void OnInspectorGUI() {
|
|
if (serializedObject == null) return;
|
|
|
|
style.wordWrap = true;
|
|
style.normal.textColor = EditorGUIUtility.isProSkin? pro: free;
|
|
|
|
serializedObject.Update();
|
|
EditorGUILayout.Space();
|
|
|
|
string text = EditorGUILayout.TextArea(script.text, style);
|
|
if (text != script.text) {
|
|
Undo.RecordObject(script, "Edit Comments");
|
|
script.text = text;
|
|
}
|
|
|
|
EditorGUILayout.Space();
|
|
|
|
serializedObject.ApplyModifiedProperties();
|
|
}
|
|
}
|
|
}
|