DelayedAttribute
Delays the update of a variable's value.
Read time 3 minutesLast updated 5 days ago
Definition
- Type: Class
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
- Inherits from: PropertyAttribute
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field, Inherited = true, AllowMultiple = false)]public sealed class DelayedAttribute : PropertyAttribute
Remarks
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, andinttypes.string - UI Toolkit Inspector: Supports ,
float,int,string, andVectortypes.Rect
Examples
using UnityEngine;public class DelayedExample : MonoBehaviour{ [Delayed] public float myDelayedFloat;}
Constructors
Constructor | Description |
|---|---|
| DelayedAttribute() | Create a new DelayedAttribute. |