---
tags:
    - "UI, User, Interface"
---

# Raw Image Main Texture

[UI](../../index.md) / [Graphic](../index.md) / [Raw Image](index.md) / **Raw Image Main Texture**

## Description

Compares the Main Texture property of Raw Image component to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| Raw Image |  |
| 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("Raw Image Main Texture")]
    [Category("UI/Graphic/Raw Image/Main Texture")]
    [Description("Compares the Main Texture property of Raw Image component to another value")]
    
    [Image(typeof(IconRawImage), ColorTheme.Type.TextLight)]
    [Keywords("UI, User, Interface")]
    
    [Parameter("Raw Image")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenConditionTexture_RawImage_CheckMainTexture : Condition
    {
        [SerializeField] private GetGameObject m_RawImage = new GetGameObject(
            new GenTypeGameObject_RawImage()
        );
        
        [SerializeField] private GetTexture m_Value = new GetTexture();
        
        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Main Texture");
            return $"{this.m_RawImage} {member} = {this.m_Value}";
        }
        
        protected override bool Run(Args args)
        {
            RawImage component = this.m_RawImage.Get<RawImage>(args);
            if (component == null) return false;
            
            return component.mainTexture == this.m_Value.Get(args) as Texture;
        }
    }
}


```

