Frame Count#
Time / Frame Count
Can Read
Cannot Write
Description#
The total number of frames since the start of the game
Code#
using System;
using UnityEngine;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Get]
[Title("Frame Count")]
[Category("Time/Frame Count")]
[Description("The total number of frames since the start of the game")]
[Image(typeof(IconFrame), ColorTheme.Type.Blue)]
[Serializable]
public class TypeNumberTimeFrameCount : TypeNumber
{
public override double GetPreview(GameObject source) => Time.frameCount;
public override double Get(Args args)
{
return Time.frameCount;
}
public override string ToString()
{
return "Frame Count";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnUpdate;
}
}