Delta Time#
Time / Delta Time
Can Read
Cannot Write
Description#
The time between frames in seconds
Code#
using System;
using UnityEngine;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Get]
[Title("Delta Time")]
[Category("Time/Delta Time")]
[Description("The time between frames in seconds")]
[Image(typeof(IconTimer), ColorTheme.Type.Blue)]
[Keywords("Time", "Clock", "Tick")]
[Serializable]
public class TypeNumberTimeDeltaTime : TypeNumber
{
public override double GetPreview(GameObject source) => Time.deltaTime;
public override double Get(Args args)
{
return Time.deltaTime;
}
public override string ToString()
{
return "Delta Time";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnUpdate;
}
}