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

Custom Collider 2D Clear Custom Shapes#

Physics 2D / Collider 2D / Custom Collider 2D / Custom Collider 2D Clear Custom Shapes ShapeIndex, ShapeCount

Description#

Executes the Clear Custom Shapes method on the Custom Collider 2D component

Parameters#

Name Description
Shape Index
Shape Count

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("Custom Collider 2D Clear Custom Shapes")]
    [Category("Physics 2D/Collider 2D/Custom Collider 2D/Clear Custom Shapes", "ShapeIndex, ShapeCount")]
    [Description("Executes the Clear Custom Shapes method on the Custom Collider 2D component")]
    
    [Image(typeof(IconTool), ColorTheme.Type.Lime, typeof(Badge2D))]
    [Keywords("Physics, 2D")]
    
    [Parameter("Shape Index")]
    [Parameter("Shape Count")]
    
    [Serializable]
    public class GenInstructionCustomCollider2D_ClearCustomShapes_2_IntShapeIndex_IntShapeCount : Instruction
    {
        [SerializeField] private GetGameObject m_CustomCollider2D = new GetGameObject(
            new GenTypeGameObject_CustomCollider2D()
        );
        
        [SerializeField] private GetInteger m_ShapeIndex = new GetInteger();
        
        [SerializeField] private GetInteger m_ShapeCount = new GetInteger();
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Clear Custom Shapes");
            return $"{this.m_CustomCollider2D} {method} ({this.m_ShapeIndex}, {this.m_ShapeCount})";
        }
        
        protected override Awaitable Run(Args args)
        {
            CustomCollider2D component = this.m_CustomCollider2D.Get<CustomCollider2D>(args);
            if (component == null) return Done;
            
            component.ClearCustomShapes(
                (int) this.m_ShapeIndex.Get(args),
                (int) this.m_ShapeCount.Get(args)
            );
            
            return Done;
        }
    }
}

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