Set Visual Effect Initial Event ID#
Effects / Visual Effect / Set Visual Effect Initial Event ID
Description#
Sets the Initial Event ID 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 Initial Event ID")]
[Category("Effects/Visual Effect/Initial Event ID")]
[Description("Sets the Initial Event ID property of Visual Effect component")]
[Image(typeof(IconVisualEffect), ColorTheme.Type.Yellow)]
[Keywords("Effect")]
[Parameter("Visual Effect")]
[Parameter("Value")]
[Serializable]
public class GenInstructionInteger_VisualEffect_SetInitialEventID : Instruction
{
[SerializeField] private GetGameObject m_VisualEffect = new GetGameObject(
new GenTypeGameObject_VisualEffect()
);
[SerializeField] private GetInteger m_Value = new GetInteger();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Initial Event ID");
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.initialEventID = (int) this.m_Value.Get(args);
return Done;
}
}
}