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 Destroying Game Object#

Game Object / Is Destroying Game Object

Description#

Returns true if the Game Object does not exist or is currently flagged to be destroyed

Parameters#

Name Description
Game Object The game object to check

Code#

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Title("Is Destroying Game Object")]
    [Image(typeof(IconCubeSolid), ColorTheme.Type.TextLight, typeof(BadgeCross))]

    [Description("Returns true if the Game Object does not exist or is currently flagged to be destroyed")]
    [Category("Game Object/Is Destroying")]
    
    [Parameter("Game Object", "The game object to check")]
    [Keywords("Null", "Empty", "Valid")]
    
    [Serializable]
    public class ConditionCoreGameObjectIsDestroying : Condition
    {
        [SerializeField] private GetGameObject m_GameObject = new GetGameObject();

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

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