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

# Set Scale Constraint Constraint Active

[Animation](../../index.md) / [Constraints](../index.md) / [Scale Constraint](index.md) / **Set Scale Constraint Constraint Active**

## Description

Sets the Constraint Active property of Scale Constraint component

## Parameters

| Name | Description |
| :--- | :---------- |
| Scale Constraint |  |
| Value |  |

## 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("Set Scale Constraint Constraint Active")]
    [Category("Animation/Constraints/Scale Constraint/Constraint Active")]
    [Description("Sets the Constraint Active property of Scale Constraint component")]
    
    [Image(typeof(IconScale), ColorTheme.Type.Pink)]
    [Keywords("Size, Bounds, Transform")]
    
    [Parameter("Scale Constraint")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenInstructionBool_ScaleConstraint_SetConstraintActive : Instruction
    {
        [SerializeField] private GetGameObject m_ScaleConstraint = new GetGameObject(
            new GenTypeGameObject_ScaleConstraint()
        );
        
        [SerializeField] private GetBool m_Value = new GetBool();
        
        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Constraint Active");
            return $"{this.m_ScaleConstraint} {member} = {this.m_Value}";
        }
        
        protected override Awaitable Run(Args args)
        {
            ScaleConstraint component = this.m_ScaleConstraint.Get<ScaleConstraint>(args);
            if (component == null) return Done;
            
            component.constraintActive = (bool) this.m_Value.Get(args);
            
            return Done;
        }
    }
}


```

