52 lines
1.8 KiB
C#
52 lines
1.8 KiB
C#
using UnityEngine;
|
|
using UnityEditor;
|
|
|
|
namespace BFEditor.Resource
|
|
{
|
|
public class ResourceExplainWindow : EditorWindow
|
|
{
|
|
const string EXPLAIN = "" +
|
|
"1.命名大小写有问题的,请手动重命名,并在git上修改(删除再添加)\n" +
|
|
"2.有些问题没有提供自动修复,需要手动修改,注意看提示.一键修复之后,可以再检查一遍\n" +
|
|
"3.大部分的修复操作其实是执行了ReImport重新导一遍\n" +
|
|
"4.资源白名单里的资源检查和导入时会自动过滤";
|
|
|
|
ResourceExplainWindow()
|
|
{
|
|
titleContent = new GUIContent("说明");
|
|
}
|
|
|
|
void OnGUI()
|
|
{
|
|
GUILayout.Space(10);
|
|
|
|
GUILayout.BeginHorizontal();
|
|
GUILayout.Space(20);
|
|
|
|
var style = new GUIStyle(GUI.skin.label);
|
|
style.normal.textColor = Color.yellow;
|
|
style.fontSize = 16;
|
|
style.alignment = TextAnchor.UpperLeft;
|
|
style.fontStyle = FontStyle.Italic;
|
|
GUILayout.Label("关于BF资源检查", style, GUILayout.Width(200), GUILayout.Height(20));
|
|
GUILayout.EndHorizontal();
|
|
|
|
GUILayout.BeginHorizontal();
|
|
GUILayout.Space(20);
|
|
style.normal.textColor = Color.black;
|
|
style.fontSize = 15;
|
|
style.fontStyle = FontStyle.Normal;
|
|
style.wordWrap = true;
|
|
GUILayout.Label(EXPLAIN, style, GUILayout.Width(410), GUILayout.Height(200));
|
|
GUILayout.EndHorizontal();
|
|
}
|
|
|
|
public static void OpenWindow()
|
|
{
|
|
var rect = new Rect(Screen.width / 2, Screen.height / 2, 450, 245);
|
|
var window = (ResourceExplainWindow)GetWindowWithRect(typeof(ResourceExplainWindow), rect);
|
|
window.Show();
|
|
}
|
|
}
|
|
}
|