---
tags:
    - "UI, Layout"
---

# Rect Transform Anchor Max

[UI](../../index.md) / [Layout](../index.md) / [Rect Transform](index.md) / **Rect Transform Anchor Max**

## Description

Compares the Anchor Max property of Rect Transform component to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| Rect Transform |  |
| Value |  |

## Code

```cs
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>

using System;
using UnityEngine;
using VisualScript.Icons;
using UnityEngine.UI;

namespace VisualScript.Runtime
{
    [Title("Rect Transform Anchor Max")]
    [Category("UI/Layout/Rect Transform/Anchor Max")]
    [Description("Compares the Anchor Max property of Rect Transform component to another value")]
    
    [Image(typeof(IconRectTransform), ColorTheme.Type.TextLight)]
    [Keywords("UI, Layout")]
    
    [Parameter("Rect Transform")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenConditionVector2_RectTransform_CheckAnchorMax : Condition
    {
        [SerializeField] private GetGameObject m_RectTransform = new GetGameObject(
            new GenTypeGameObject_RectTransform()
        );
        
        [SerializeField] private GetVector2 m_Value = new GetVector2();
        
        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Anchor Max");
            return $"{this.m_RectTransform} {member} = {this.m_Value}";
        }
        
        protected override bool Run(Args args)
        {
            RectTransform component = this.m_RectTransform.Get<RectTransform>(args);
            if (component == null) return false;
            
            return component.anchorMax == (Vector2) this.m_Value.Get(args);
        }
    }
}


```

