Canvas Renderer Get Secondary Texture#
Rendering / Canvas Renderer / Canvas Renderer Get Secondary Texture
Description#
Compares the Get Secondary Texture method of Canvas Renderer component to another value
Parameters#
| Name | Description |
|---|---|
| Canvas Renderer | |
| Index | |
| 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.Rendering;
namespace VisualScript.Runtime
{
[Title("Canvas Renderer Get Secondary Texture")]
[Category("Rendering/Canvas Renderer/Get Secondary Texture")]
[Description("Compares the Get Secondary Texture method of Canvas Renderer component to another value")]
[Image(typeof(IconEye), ColorTheme.Type.TextLight)]
[Parameter("Canvas Renderer")]
[Parameter("Index")]
[Parameter("Value")]
[Serializable]
public class GenConditionTexture_CanvasRenderer_CheckGetSecondaryTexture_1 : Condition
{
[SerializeField] private GetGameObject m_CanvasRenderer = new GetGameObject(
new GenTypeGameObject_CanvasRenderer()
);
[SerializeField] private GetTexture m_Value = new GetTexture();
[SerializeField] private GetInteger m_Index = new GetInteger();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Get Secondary Texture");
string parameters = $"({this.m_Index})";
return $"{this.m_CanvasRenderer} {method} = {this.m_Value}";
}
protected override bool Run(Args args)
{
CanvasRenderer component = this.m_CanvasRenderer.Get<CanvasRenderer>(args);
if (component == null) return false;
Texture2D value = component.GetSecondaryTexture(
(int) this.m_Index.Get(args)
);
return value == this.m_Value.Get(args) as Texture2D;
}
}
}