CustomEditor

 

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.

Constructors

CustomEditor

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.CustomEditor

static function CustomEditor (期待类型 : System.Type) : CustomEditor

Description

定义了自定义编辑器类可以编辑的类。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值