On Start#
Component / On Start
Description#
Executes when the game object or component attached is initialized
Code#
using System;
using UnityEngine;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Title("On Start")]
[Image(typeof(IconArrowCircleRight), ColorTheme.Type.Yellow)]
[Description("Executes when the game object or component attached is initialized")]
[Category("Component/On Start")]
[Keywords("Initialize", "Setup")]
[Serializable]
public class TriggerCoreStart : TriggerHandleSubscriptionBase<HandleStart>
{
protected override string GetTitle(GameObject source) => "Start";
protected override void OnTrigger(GameObject target)
{
using Args args = Args.Get(this.Component, target);
this.Run(args);
}
}
}