---
tags:
    - "UI, User, Interface, TMP, Text, Mesh, Pro"
---

# TextMeshPro - Text (UI) Get Modified Material

[UI](../../index.md) / [Graphic](../index.md) / [TextMeshPro - Text (UI)](index.md) / **TextMeshPro - Text (UI) Get Modified Material**

## Description

Compares the Get Modified Material method of TextMeshPro - Text (UI) component to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| Text Mesh Pro UGUI |  |
| Base Material |  |
| 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;
using TMPro;

namespace VisualScript.Runtime
{
    [Title("TextMeshPro - Text (UI) Get Modified Material")]
    [Category("UI/Graphic/TextMeshPro - Text (UI)/Get Modified Material")]
    [Description("Compares the Get Modified Material method of TextMeshPro - Text (UI) component to another value")]

    [Image(typeof(IconUIText), ColorTheme.Type.Blue)]
    [Keywords("UI, User, Interface, TMP, Text, Mesh, Pro")]

    [Parameter("Text Mesh Pro UGUI")]
    [Parameter("Base Material")]
    [Parameter("Value")]

    [Serializable]
    public class GenConditionMaterial_TextMeshProUGUI_CheckGetModifiedMaterial_1 : Condition
    {
        [SerializeField] private GetGameObject m_TextMeshProUGUI = new GetGameObject(
            new GenTypeGameObject_TextMeshProUGUI()
        );

        [SerializeField] private GetMaterial m_Value = new GetMaterial();

        [SerializeField] private GetMaterial m_BaseMaterial = new GetMaterial();

        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Get Modified Material");
            string parameters = $"({this.m_BaseMaterial})";
            return $"{this.m_TextMeshProUGUI} {method} = {this.m_Value}";
        }

        protected override bool Run(Args args)
        {
            TextMeshProUGUI component = this.m_TextMeshProUGUI.Get<TextMeshProUGUI>(args);
            if (component == null) return false;

            Material value = component.GetModifiedMaterial(
                (Material) this.m_BaseMaterial.Get(args)
            );

            return value == this.m_Value.Get(args) as Material;
        }
    }
}
```

