Visual Effect Set Bool#
Effects / Visual Effect / Visual Effect Set Bool Name, B
Description#
Executes the Set Bool method on the Visual Effect component
Parameters#
| Name | Description |
|---|---|
| Name | |
| B |
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.VFX;
namespace VisualScript.Runtime
{
[Title("Visual Effect Set Bool")]
[Category("Effects/Visual Effect/Set Bool", "Name, B")]
[Description("Executes the Set Bool method on the Visual Effect component")]
[Image(typeof(IconVisualEffect), ColorTheme.Type.Yellow)]
[Keywords("Effect")]
[Parameter("Name")]
[Parameter("B")]
[Serializable]
public class GenInstructionVisualEffect_SetBool_2_StringName_BoolB : Instruction
{
[SerializeField] private GetGameObject m_VisualEffect = new GetGameObject(
new GenTypeGameObject_VisualEffect()
);
[SerializeField] private GetString m_Name = new GetString();
[SerializeField] private GetBool m_B = new GetBool();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Set Bool");
return $"{this.m_VisualEffect} {method} ({this.m_Name}, {this.m_B})";
}
protected override Awaitable Run(Args args)
{
VisualEffect component = this.m_VisualEffect.Get<VisualEffect>(args);
if (component == null) return Done;
component.SetBool(
(string) this.m_Name.Get(args),
(bool) this.m_B.Get(args)
);
return Done;
}
}
}