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

Game Object Active Self#

Game Object / Game Object Active Self

  • Can Read

  • Cannot Write

Description#

The local active state of the GameObject

Code#

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]
    
    [Title("Game Object Active Self")]
    [Category("Game Object/Active Self")]
    
    [Description("The local active state of the GameObject")]
    [Image(typeof(IconCubeOutline), ColorTheme.Type.TextLight, typeof(BadgeTick))]
    
    [Keywords("Enabled", "Disabled", "Active", "Inactive", "Local")]
    
    [Serializable]
    public class TypeBoolGameObjectActiveSelf : TypeBool
    {
        [SerializeField] private GetGameObject m_GameObject = new GetGameObject();

        public override bool GetPreview(GameObject source)
        {
            GameObject gameObject = this.m_GameObject.GetPreview(source);
            return gameObject != null && gameObject.activeSelf;
        }

        public override bool Get(Args args)
        {
            GameObject gameObject = this.m_GameObject.Get(args);
            return gameObject != null && gameObject.activeSelf;
        }
        
        public override string ToString()
        {
            return $"{this.m_GameObject} Local Active";
        }

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.