文档

Unity Engine

Unity Engine

ObjectSelectorHandlerAttribute

A class attribute that allows you to define dynamic constraint on a MonoBehavior or ScriptableObject 's field for the object selector.
阅读时间3 分钟最后更新于 1 个月前

Definition

警告
Removed. ObjectSelectorHandlerAttribute has been deprecated. Use SearchContextAttribute instead.
[AttributeUsage(AttributeTargets.Method)]public class ObjectSelectorHandlerAttribute : Attribute

Remarks

This attribute identifies methods as custom object selector handlers. Handlers require editor-specific objects to work. If you want to constrain a UnityEngine script's field, you must define a custom attribute, decorate the field with it, and use this attribute in your editor code when you declare your custom handler.

Constructors

Constructor

Description

ObjectSelectorHandlerAttribute(System.Type)Constructor used to declare the ObjectSelectorHandlerAttribute on a method.

Properties

Property

Description

attributeTypeThe attribute type.

Inheritance

Inherited Members