On Fixed Update#
Component / On Fixed Update
Description#
Executes at a fixed time step in sync with the physics update
Code#
using System;
using UnityEngine;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Title("On Fixed Update")]
[Image(typeof(IconUpdate), ColorTheme.Type.Blue, typeof(BadgePhysics))]
[Description("Executes at a fixed time step in sync with the physics update")]
[Category("Component/On Fixed Update")]
[Keywords("Tick", "Clock", "Every", "Frame", "Physics")]
[Serializable]
public class TriggerCoreFixedUpdate : TriggerHandleSubscriptionBase<HandleFixedUpdate>
{
protected override string GetTitle(GameObject source) => "Fixed Update";
protected override void OnTrigger(GameObject target)
{
using Args args = Args.Get(this.Component, target);
this.Run(args);
}
}
}