PropertyAttribute
Base class to derive custom property attributes from. Use this to create custom attributes for script variables.
Read time 3 minutesLast updated 4 days ago
Definition
- Type: Class
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
- Inherits from: Attribute
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field, Inherited = true, AllowMultiple = false)]public abstract class PropertyAttribute : Attribute
Remarks
A custom attributes can be hooked up with a custom PropertyDrawer class to control how a script variable with that attribute is shown in the Inspector.
Additional Resources: PropertyDrawer class.
Properties
Property | Description |
|---|---|
| applyToCollection | Makes attribute affect collections instead of their items. |
| order | Optional field to specify the order that multiple DecorationDrawers should be drawn in. |