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 Textures#

Compare / Compare Textures

Description#

Returns true if two Textures are equal

Parameters#

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

Code#

using System;
using UnityEngine;
using VisualScript.Icons;

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

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

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