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

Is Active Self#

Game Object / Is Active Self

Description#

Returns true if the local state of the Game Object is active

Parameters#

Name Description
Game Object The Game Object targeted

Code#

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Title("Is Active Self")]
    [Image(typeof(IconCubeOutline), ColorTheme.Type.TextLight)]

    [Description("Returns true if the local state of the Game Object is active")]
    [Category("Game Object/Is Active Self")]
    
    [Parameter("Game Object", "The Game Object targeted")]
    [Keywords("Enabled", "Active", "Disabled", "Inactive")]
    
    [Serializable]
    public class ConditionCoreGameObjectCompareIsActiveSelf : Condition
    {
        [SerializeField] private GetGameObject m_GameObject = new GetGameObject();

        protected override string GetTitle(GameObject source) => $"{this.m_GameObject} is Active Self";

        protected override bool Run(Args args)
        {
            GameObject gameObject = this.m_GameObject.Get(args);
            return gameObject != null && gameObject.activeSelf;
        }
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.