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

Invert#

Math / Invert

  • Can Read

  • Cannot Write

Description#

Returns True if the value is False and vice versa

Code#

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]
    
    [Title("Invert")]
    [Category("Math/Invert")]
    
    [Description("Returns True if the value is False and vice versa")]
    [Image(typeof(IconToggleOff), ColorTheme.Type.Yellow, typeof(BadgeArrowLeft))]
    
    [Keywords("Not", "!")]
    
    [Serializable]
    public class TypeBoolMathInvert : TypeBool
    {
        [SerializeField] private GetBool m_Value = new GetBool();

        public override bool GetPreview(GameObject source) => !this.m_Value.GetPreview(source);

        public override bool Get(Args args) => !this.m_Value.Get(args);

        public override string ToString()
        {
            return $"Invert {this.m_Value}";
        }

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