---
tags:
    - "Size, Bounds, Transform"
---

# Scale Constraint Remove Source

[Animation](../../index.md) / [Constraints](../index.md) / [Scale Constraint](index.md) / **Scale Constraint Remove Source**

## Description

Executes the Remove Source method on the Scale Constraint component

## Parameters

| Name | Description |
| :--- | :---------- |
| Index |  |

## Code

```cs
// <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;
using UnityEngine.Animations;

namespace VisualScript.Runtime
{
    [Title("Scale Constraint Remove Source")]
    [Category("Animation/Constraints/Scale Constraint/Remove Source")]
    [Description("Executes the Remove Source method on the Scale Constraint component")]
    
    [Image(typeof(IconScale), ColorTheme.Type.Pink)]
    [Keywords("Size, Bounds, Transform")]
    
    [Parameter("Index")]
    
    [Serializable]
    public class GenInstructionScaleConstraint_RemoveSource_1 : Instruction
    {
        [SerializeField] private GetGameObject m_ScaleConstraint = new GetGameObject(
            new GenTypeGameObject_ScaleConstraint()
        );
        
        [SerializeField] private GetInteger m_Index = new GetInteger();
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Remove Source");
            return $"{this.m_ScaleConstraint} {method} ({this.m_Index})";
        }
        
        protected override Awaitable Run(Args args)
        {
            ScaleConstraint component = this.m_ScaleConstraint.Get<ScaleConstraint>(args);
            if (component == null) return Done;
            
            component.RemoveSource(
                (int) this.m_Index.Get(args)
            );
            
            return Done;
        }
    }
}


```

