Set Canvas Renderer Cull#
Rendering / Canvas Renderer / Set Canvas Renderer Cull
Description#
Sets the Cull property of Canvas Renderer component
Parameters#
| Name | Description |
|---|---|
| Canvas Renderer | |
| 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("Set Canvas Renderer Cull")]
[Category("Rendering/Canvas Renderer/Cull")]
[Description("Sets the Cull property of Canvas Renderer component")]
[Image(typeof(IconEye), ColorTheme.Type.TextLight)]
[Parameter("Canvas Renderer")]
[Parameter("Value")]
[Serializable]
public class GenInstructionBool_CanvasRenderer_SetCull : Instruction
{
[SerializeField] private GetGameObject m_CanvasRenderer = new GetGameObject(
new GenTypeGameObject_CanvasRenderer()
);
[SerializeField] private GetBool m_Value = new GetBool();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Cull");
return $"{this.m_CanvasRenderer} {member} = {this.m_Value}";
}
protected override Awaitable Run(Args args)
{
CanvasRenderer component = this.m_CanvasRenderer.Get<CanvasRenderer>(args);
if (component == null) return Done;
component.cull = (bool) this.m_Value.Get(args);
return Done;
}
}
}