---
tags:
    - "Effect"
---

# Visual Effect Get Texture

[Effects](../index.md) / [Visual Effect](index.md) / **Visual Effect Get Texture** Name

## Description

Compares the Get Texture method of Visual Effect component to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| Visual Effect |  |
| Name |  |
| 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.VFX;

namespace VisualScript.Runtime
{
    [Title("Visual Effect Get Texture")]
    [Category("Effects/Visual Effect/Get Texture", "Name")]
    [Description("Compares the Get Texture method of Visual Effect component to another value")]
    
    [Image(typeof(IconVisualEffect), ColorTheme.Type.Yellow)]
    [Keywords("Effect")]
    
    [Parameter("Visual Effect")]
    [Parameter("Name")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenConditionTexture_VisualEffect_CheckGetTexture_1_StringName : Condition
    {
        [SerializeField] private GetGameObject m_VisualEffect = new GetGameObject(
            new GenTypeGameObject_VisualEffect()
        );
        
        [SerializeField] private GetTexture m_Value = new GetTexture();
        
        [SerializeField] private GetString m_Name = new GetString();
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Get Texture");
            string parameters = $"({this.m_Name})";
            return $"{this.m_VisualEffect} {method} = {this.m_Value}";
        }
        
        protected override bool Run(Args args)
        {
            VisualEffect component = this.m_VisualEffect.Get<VisualEffect>(args);
            if (component == null) return false;
            
            Texture value = component.GetTexture(
                (string) this.m_Name.Get(args)
            );
            
            return value == this.m_Value.Get(args) as Texture;
        }
    }
}


```

