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