Visual Effect Output Event Received#
Effects / Visual Effect / Visual Effect Output Event Received
Description#
Executes whenever the Output Event Received delegate of Visual Effect component is invoked
Parameters#
| Name | Description |
|---|---|
| Source |
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 Output Event Received")]
[Category("Effects/Visual Effect/Output Event Received")]
[Description("Executes whenever the Output Event Received delegate of Visual Effect component is invoked")]
[Image(typeof(IconVisualEffect), ColorTheme.Type.Yellow)]
[Keywords("Effect")]
[Parameter("Source")]
[Serializable]
public class GenTriggerVisualEffect_OutputEventReceived : TriggerSourceComponentBase<VisualEffect>
{
public GenTriggerVisualEffect_OutputEventReceived() : base(new GenTypeGameObject_VisualEffect())
{ }
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Output Event Received");
return $"{this.SourceName} {member}";
}
protected override void OnSourceChanged(VisualEffect previousSource, VisualEffect newSource)
{
if (previousSource != null)
{
previousSource.outputEventReceived -= this.Run;
}
if (newSource != null)
{
newSource.outputEventReceived += this.Run;
}
}
private void Run(UnityEngine.VFX.VFXOutputEventArgs value1)
{
using Args args = Args.Get(
this.Component,
this.m_CurrentSource
);
this.Run(args);
}
}
}