Summary
[Pro-Only]
When applied to a
UnityEngine.GameObject field, any object assigned to that field must have a component of
the specified type.
- Assembly
- Kybernetik
.InspectorGadgets .dll - Namespace
- InspectorGadgets
.Attributes - Base Types
-
- PropertyAttribute
- ValidatorAttribute
graph BT
Type-->Base0["ValidatorAttribute"]
click Base0 "/inspector-gadgets/api/InspectorGadgets.Attributes/ValidatorAttribute"
Base0-->Base1["PropertyAttribute"]
Type["HasComponentAttribute"]
class Type type-node
Syntax
[System.Diagnostics.Conditional("UNITY_EDITOR")]
public sealed class HasComponentAttribute : ValidatorAttribute
Attributes
| Type | Description |
|---|---|
| ConditionalAttribute |
Constructors
| Name | Summary |
|---|---|
| Has |
Creates a new InspectorGadgets.Attributes.HasComponentAttribute to require a component of the specified type. |
Fields
| Name | Constant Value | Summary |
|---|---|---|
| ComponentTypes |
The types of components that are required.
|
Methods
| Name | Value | Summary |
|---|---|---|
| TryValidate |
bool |
Validates a
double value or returns false to revert to the previous value.Inherited from ValidatorAttribute
|
| TryValidate |
bool |
Validates a
long value or returns false to revert to the previous value.Inherited from ValidatorAttribute
|
| TryValidate |
bool |
Validates an
UnityEngine.Object value or returns false to revert to the previous value. |