Events API | Bolt Visual Scripting | 1.4.12
docs.unity3d.com
    Show / Hide Table of Contents

    Events API

    Bolt provides a simple API to trigger custom events from script.

    Usings

    Make sure you add the following usings to your C# script to access the API:

    using Ludiq;
    using Bolt;
    

    Triggering

    A single method call is needed to trigger a custom event:

    CustomEvent.Trigger(targetGameObject, argument1, argument2, ...)
    

    You can pass as many arguments as you need (or no event at all).

    For example, this custom event unit:

    Can be triggered with this line of code:

    CustomEvent.Trigger(enemy, "Damage", 30);
    
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX