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 Transform Parent Change#

Component / Hierarchy / On Transform Parent Change

Description#

Executes when the parent of the transform changes

Code#

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Title("On Transform Parent Change")]
    [Image(typeof(IconCubeOutline), ColorTheme.Type.Lime, typeof(BadgeArrowUp))]
    
    [Description("Executes when the parent of the transform changes")]
    [Category("Component/Hierarchy/On Parent Change")]
    
    [Keywords("Transform")]

    [Serializable]
    public class TriggerCoreTransformChangeParent : TriggerHandleSourceBase<HandleOnTransformParentChange>
    {
        // PROPERTIES: ----------------------------------------------------------------------------

        protected override string GetTitle(GameObject source) => $"{this.SourceName} Parent Change";

        // OVERRIDE METHODS: ----------------------------------------------------------------------
        
        protected override void OnTrigger(GameObject target)
        {
            using Args args = Args.Get(this.Component, target);
            this.Run(args);
        }
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.