DrawIfAttribute Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Conditionally draws a property or field.
[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple=true)]
public sealed class DrawIfAttribute : UnityEngine.PropertyAttribute
[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple=true)>]
type DrawIfAttribute = class
inherit PropertyAttribute
Public NotInheritable Class DrawIfAttribute
Inherits PropertyAttribute
- Inheritance
-
UnityEngine.PropertyAttributeDrawIfAttribute
- Attributes
Remarks
Based on https://forum.unity.com/threads/draw-a-field-only-if-a-condition-is-met.448855/
Constructors
| Name | Description |
|---|---|
| DrawIfAttribute(String, Object, DrawIfAttribute+ComparisonType) |
Only draws the field only if the provided property's boolValue matches the compared value. |
Properties
| Name | Description |
|---|---|
| CompareAgainst |
The value to compare against. |
| ComparedPropertyName |
The serialized name of the property to compare. |
| ComparisonMode |
The comparison to perform. |