CustomEditor Inherits from System.Attribute
Tells an Editor class which run-time type it's an editor for.
Note: This is an editor class. To use it you have to place your script in Assets/Editor inside your project folder. Editor classes are in the UnityEditor namespace so for C# scripts you need to add "using UnityEditor;" at the beginning of the script.
When you make a custom editor for a component, you need put this attribute on the editor class.
See Also: Editor class.
Defines which object type the custom editor class can edit. |
CustomEditor.CustomEditor
static function CustomEditor (inspectedType : System.Type) : CustomEditor
Description
Defines which object type the custom editor class can edit.
CustomEditor 继承于System.Attribute
指示编辑器类可以编辑的运行态类型
注意:这是一个编辑器类。须将脚本放置到工程中Assets/Editor文件夹中。编辑器类位于UnityEditor命名空间,所以C#脚本必须添加在脚本开始处添加“using UnityEditor;”语句。为组件添加一个自定义编辑器时,需要为编辑器类添加该属性
构建函数
定义了自定义编辑器类可以编辑的类 |
CustomEditor.CustomEditor
static function CustomEditor (期待类型 : System.Type) : CustomEditor
Description
定义了自定义编辑器类可以编辑的类。