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