Documentation index for AI agents (llms.txt) A Markdown version of every page is available: request the page's source under /docs/, follow the "alternate" link in this page's head, or start from /llms.txt.
Visual Script logo Manual

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;
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.