Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


DelayedAttribute

Delays the update of a variable's value.
Read time 3 minutesLast updated 5 days ago

Definition

[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
    ,
    int
    , and
    string
    types.
  • UI Toolkit Inspector: Supports
    float
    ,
    int
    ,
    string
    ,
    Vector
    , and
    Rect
    types.

Examples

using UnityEngine;public class DelayedExample : MonoBehaviour{ [Delayed] public float myDelayedFloat;}

Constructors

Constructor

Description

DelayedAttribute()Create a new DelayedAttribute.

Inheritance

Inherited Members