Table of contents

Create #

for creating event must implement IEvent interface.

for example, we create a OnClick button event

using UnityEngine;
using ArushaSoft.GenericEventSystem;

public class ButtonEvent : MonoBehaviour ,IEvent
{
    private CustomEvent OnClick = new CustomEvent();

    public void AddEvent(EventList eventList)
    {
        eventList.Add(OnClick, nameof(OnClick));
    }
}

Invoke #

        OnClick?.Invoke();

What are your feelings
Updated on May 21, 2022