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 Is Child Of#

Transform / Hierarchy / Transform Is Child Of

Description#

Whether this transform a child of a transform

Parameters#

Name Description
Transform
Parent

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 Is Child Of")]
    [Category("Transform/Hierarchy/Is Child Of")]
    [Description("Whether this transform a child of a transform")]
    
    [Image(typeof(IconHanger), ColorTheme.Type.Lime, typeof(BadgeArrowUp))]
    [Keywords("Transform")]
    
    [Parameter("Transform")]
    [Parameter("Parent")]
    
    [Serializable]
    public class GenConditionBool_Transform_CheckIsChildOf_1 : Condition
    {
        [SerializeField] private GetGameObject m_Transform = new GetGameObject(
            new GenTypeGameObject_Transform()
        );
        
        [SerializeField] private GetGameObject m_Parent = new GetGameObject();
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Is Child Of");
            string parameters = $"({this.m_Parent})";
            return $"{this.m_Transform} {method}";
        }
        
        protected override bool Run(Args args)
        {
            Transform component = this.m_Transform.Get<Transform>(args);
            if (component == null) return false;
            
            bool value = component.IsChildOf(
                (Transform) this.m_Parent.Get<Transform>(args)
            );
            
            return value;
        }
    }
}

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