Fixed Unscaled Time#
Time / Fixed Unscaled Time
Can Read
Cannot Write
Description#
The unscaled time in seconds since the start of the game in the Physics update
Code#
using System;
using UnityEngine;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Get]
[Title("Fixed Unscaled Time")]
[Category("Time/Fixed Unscaled Time")]
[Description("The unscaled time in seconds since the start of the game in the Physics update")]
[Image(typeof(IconTimer), ColorTheme.Type.TextLight, typeof(BadgePhysics))]
[Keywords("Time", "Physics")]
[Serializable]
public class TypeNumberTimeFixedUnscaledTime : TypeNumber
{
public override double GetPreview(GameObject source) => Time.fixedUnscaledTimeAsDouble;
public override double Get(Args args)
{
return Time.fixedUnscaledTimeAsDouble;
}
public override string ToString()
{
return "Fixed Unscaled Time";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnFixedUpdate;
}
}