Canvas Renderer Set Secondary Texture Count#
Rendering / Canvas Renderer / Canvas Renderer Set Secondary Texture Count
Description#
Executes the Set Secondary Texture Count method on the Canvas Renderer component
Parameters#
| Name | Description |
|---|---|
| Size |
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 Set Secondary Texture Count")]
[Category("Rendering/Canvas Renderer/Set Secondary Texture Count")]
[Description("Executes the Set Secondary Texture Count method on the Canvas Renderer component")]
[Image(typeof(IconEye), ColorTheme.Type.TextLight)]
[Parameter("Size")]
[Serializable]
public class GenInstructionCanvasRenderer_SetSecondaryTextureCount_1 : Instruction
{
[SerializeField] private GetGameObject m_CanvasRenderer = new GetGameObject(
new GenTypeGameObject_CanvasRenderer()
);
[SerializeField] private GetInteger m_Size = new GetInteger();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Set Secondary Texture Count");
return $"{this.m_CanvasRenderer} {method} ({this.m_Size})";
}
protected override Awaitable Run(Args args)
{
CanvasRenderer component = this.m_CanvasRenderer.Get<CanvasRenderer>(args);
if (component == null) return Done;
component.SetSecondaryTextureCount(
(int) this.m_Size.Get(args)
);
return Done;
}
}
}