Unity - Scripting API: DelayedAttribute
class in UnityEngine
/
Inherits from:PropertyAttribute
/
Implemented in:UnityEngine.CoreModule
Success!
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Submission failed
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
Description
Delays the update of a variable's value.
When this attribute is used, the field only returns a new value after the user presses Enter or shifts focus away from the field.
- IMGUI Inspector: Supports
float,int, andstringtypes. - UI Toolkit Inspector: Supports
float,int,string,Vector, andRecttypes.
using UnityEngine;public class DelayedExample : MonoBehaviour { [Delayed] public float myDelayedFloat; }
Constructors
| Constructor | Description |
|---|---|
| DelayedAttribute | Create a new DelayedAttribute. |
Inherited Members
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. |