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

On Disable#

Component / On Disable

Description#

Executes when the game object or component attached is disabled

Code#

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Title("On Disable")]
    [Image(typeof(IconArrowCircleRight), ColorTheme.Type.Red)]
    
    [Description("Executes when the game object or component attached is disabled")]
    [Category("Component/On Disable")]
    
    [Keywords("Deactivate", "Inactive")]

    [Serializable]
    public class TriggerCoreDisable : Trigger
    {
        protected override string GetTitle(GameObject source) => "Disable";

        public override void OnDisable()
        {
            base.OnDisable();
            
            using Args args = Args.Get(this.Component, this.Component);
            this.Run(args);
        }
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.