首先,建个文件夹Editor 这个脚本放在Editor里(Editor文件夹的作用可以自行搜索)
using UnityEditor;
using UnityEngine;
using UnityEditor.UI;
//定义自定义编辑器类可以编辑的对象类型。
[CustomEditor(typeof(Test)
首先,建个文件夹Editor 这个脚本放在Editor里(Editor文件夹的作用可以自行搜索)
using UnityEditor;
using UnityEngine;
using UnityEditor.UI;
//定义自定义编辑器类可以编辑的对象类型。
[CustomEditor(typeof(Test)