Alchemy/docs/articles/en/attributes/required.md
2024-02-20 14:49:47 +09:00

18 lines
353 B
Markdown

# Required Attribute
Displays a warning if the field does not have an object reference assigned.
![img](../../../images/img-attribute-required.png)
```cs
[Required]
public GameObject requiredField1;
[Required("Custom message")]
public Material requiredField2;
```
| Parameter | Description |
| - | - |
| Message | Text to display in the warning |