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

Compare Vector3#

Compare / Compare Vector3

Description#

Returns true if two Vector3s are equal

Parameters#

Name Description
Value 1 The Vector3 targeted
Value 2 The Vector3 to compare against

Code#

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Title("Compare Vector3")]
    [Image(typeof(IconVector3), ColorTheme.Type.Lime)]
    
    [Description("Returns true if two Vector3s are equal")]
    [Category("Compare/Compare Vector3")]
    
    [Parameter("Value 1", "The Vector3 targeted")]
    [Parameter("Value 2", "The Vector3 to compare against")]
    
    [Keywords("Check", "Equals", "Same")]
    
    [Serializable]
    public class ConditionCoreCompareVector3 : Condition
    {
        [SerializeField] private GetVector3 m_Value1 = new GetVector3();
        [SerializeField] private GetVector3 m_Value2 = new GetVector3();

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

        protected override bool Run(Args args)
        {
            Vector3 value1 = this.m_Value1.Get(args);
            Vector3 value2 = this.m_Value2.Get(args);
            
            return value1 == value2;
        }
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.