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

Transform Detach Children#

Transform / Hierarchy / Transform Detach Children

Description#

Unparents all children

Code#

// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Title("Transform Detach Children")]
    [Category("Transform/Hierarchy/Detach Children")]
    [Description("Unparents all children")]
    
    [Image(typeof(IconHanger), ColorTheme.Type.Lime, typeof(BadgeCross))]
    [Keywords("Transform")]
    
    [Serializable]
    public class GenInstructionTransform_DetachChildren_0 : Instruction
    {
        [SerializeField] private GetGameObject m_Transform = new GetGameObject(
            new GenTypeGameObject_Transform()
        );
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Detach Children");
            return $"{this.m_Transform} {method}";
        }
        
        protected override Awaitable Run(Args args)
        {
            Transform component = this.m_Transform.Get<Transform>(args);
            if (component == null) return Done;
            
            component.DetachChildren();
            
            return Done;
        }
    }
}

Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.