Time#
Time / Time
Can Read
Cannot Write
Description#
This is the scaled time in seconds since the start of the game
Code#
using System;
using UnityEngine;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Get]
[Title("Time")]
[Category("Time/Time")]
[Description("This is the scaled time in seconds since the start of the game")]
[Image(typeof(IconTimer), ColorTheme.Type.TextLight)]
[Keywords("Time, Clock, Tick")]
[Serializable]
public class TypeNumberTimeTime : TypeNumber
{
public override double GetPreview(GameObject source) => Time.timeAsDouble;
public override double Get(Args args)
{
return Time.timeAsDouble;
}
public override string ToString()
{
return "Time";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnUpdate;
}
}