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

Canvas Group Interactable#

UI / Layout / Canvas Group / Canvas Group Interactable

  • Can Read

  • Can Write

Description#

The Interactable property of the Canvas Group component

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;
using UnityEngine.UI;

namespace VisualScript.Runtime
{
    [Get]
    [Set]
    
    [Title("Canvas Group Interactable")]
    [Category("UI/Layout/Canvas Group/Interactable")]
    [Description("The Interactable property of the Canvas Group component")]
    
    [Image(typeof(IconCanvasGroup), ColorTheme.Type.TextLight)]
    [Keywords("UI, Layout")]
    
    [Serializable]
    public class GenTypeBool_CanvasGroup_Interactable : TypeBool
    {
        [SerializeField] private GetGameObject m_CanvasGroup = new GetGameObject(
            new GenTypeGameObject_CanvasGroup()
        );
        
        public override bool GetPreview(GameObject source)
        {
            GameObject instance = this.m_CanvasGroup.GetPreview(source);
            if (instance == null) return default;
            
            CanvasGroup component = instance.GetComponent<CanvasGroup>();
            return component != null ? component.interactable : default;
        }
        
        public override bool Get(Args args)
        {
            CanvasGroup instance = this.m_CanvasGroup.Get<CanvasGroup>(args);
            return instance != null
                ? instance.interactable
                : default;
        }
        
        public override void Set(bool value, Args args)
        {
            CanvasGroup component = this.m_CanvasGroup.Get<CanvasGroup>(args);
            if (component != null) component.interactable = (bool) value;
        }
        
        public override string ToString()
        {
            return $"{this.m_CanvasGroup} Interactable";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}

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