Raw Image Texture#
UI / Graphic / Raw Image / Raw Image Texture
Description#
Compares the Texture property of Raw Image component to another value
Parameters#
| Name | Description |
|---|---|
| Raw Image | |
| Value |
Code#
// <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 Texture")]
[Category("UI/Graphic/Raw Image/Texture")]
[Description("Compares the 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_CheckTexture : 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("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.texture == this.m_Value.Get(args) as Texture;
}
}
}