---
tags:
    - "Location, Follow, Transform"
---

# Position Constraint Remove Source

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

## Description

Executes the Remove Source method on the Position 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("Position Constraint Remove Source")]
    [Category("Animation/Constraints/Position Constraint/Remove Source")]
    [Description("Executes the Remove Source method on the Position Constraint component")]
    
    [Image(typeof(IconPosition), ColorTheme.Type.Pink)]
    [Keywords("Location, Follow, Transform")]
    
    [Parameter("Index")]
    
    [Serializable]
    public class GenInstructionPositionConstraint_RemoveSource_1 : Instruction
    {
        [SerializeField] private GetGameObject m_PositionConstraint = new GetGameObject(
            new GenTypeGameObject_PositionConstraint()
        );
        
        [SerializeField] private GetInteger m_Index = new GetInteger();
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Remove Source");
            return $"{this.m_PositionConstraint} {method} ({this.m_Index})";
        }
        
        protected override Awaitable Run(Args args)
        {
            PositionConstraint component = this.m_PositionConstraint.Get<PositionConstraint>(args);
            if (component == null) return Done;
            
            component.RemoveSource(
                (int) this.m_Index.Get(args)
            );
            
            return Done;
        }
    }
}


```

