---
tags:
    - "Effect"
---

# Visual Effect Send Event

[Effects](../index.md) / [Visual Effect](index.md) / **Visual Effect Send Event** EventNameID

## Description

Executes the Send Event method on the Visual Effect component

## Parameters

| Name | Description |
| :--- | :---------- |
| Event Name ID |  |

## Code

```cs
// <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 Send Event")]
    [Category("Effects/Visual Effect/Send Event", "EventNameID")]
    [Description("Executes the Send Event method on the Visual Effect component")]

    [Image(typeof(IconVisualEffect), ColorTheme.Type.Yellow)]
    [Keywords("Effect")]

    [Parameter("Event Name ID")]

    [Serializable]
    public class GenInstructionVisualEffect_SendEvent_1_IntEventNameID : Instruction
    {
        [SerializeField] private GetGameObject m_VisualEffect = new GetGameObject(
            new GenTypeGameObject_VisualEffect()
        );

        [SerializeField] private GetInteger m_EventNameID = new GetInteger();

        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Send Event");
            return $"{this.m_VisualEffect} {method} ({this.m_EventNameID})";
        }

        protected override Awaitable Run(Args args)
        {
            VisualEffect component = this.m_VisualEffect.Get<VisualEffect>(args);
            if (component == null) return Done;

            component.SendEvent(
                (int) this.m_EventNameID.Get(args)
            );

            return Done;
        }
    }
}
```

