---
tags:
    - "UI, Layout"
---

# Set Canvas Group Interactable

[UI](../../index.md) / [Layout](../index.md) / [Canvas Group](index.md) / **Set Canvas Group Interactable**

## Description

Sets the Interactable property of Canvas Group component

## Parameters

| Name | Description |
| :--- | :---------- |
| Canvas Group |  |
| 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.UI;

namespace VisualScript.Runtime
{
    [Title("Set Canvas Group Interactable")]
    [Category("UI/Layout/Canvas Group/Interactable")]
    [Description("Sets the Interactable property of Canvas Group component")]
    
    [Image(typeof(IconCanvasGroup), ColorTheme.Type.TextLight)]
    [Keywords("UI, Layout")]
    
    [Parameter("Canvas Group")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenInstructionBool_CanvasGroup_SetInteractable : Instruction
    {
        [SerializeField] private GetGameObject m_CanvasGroup = new GetGameObject(
            new GenTypeGameObject_CanvasGroup()
        );
        
        [SerializeField] private GetBool m_Value = new GetBool();
        
        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Interactable");
            return $"{this.m_CanvasGroup} {member} = {this.m_Value}";
        }
        
        protected override Awaitable Run(Args args)
        {
            CanvasGroup component = this.m_CanvasGroup.Get<CanvasGroup>(args);
            if (component == null) return Done;
            
            component.interactable = (bool) this.m_Value.Get(args);
            
            return Done;
        }
    }
}


```

