using System; using UnityEngine; using EVM = LanLib.EventManager; namespace Samples.EventManager { public struct TestEvent { } public class TestSubscribeEvent : MonoBehaviour { private void Awake() { EVM.EventManager.Instance.Subscribe(OnTest); } private void OnDestroy() { EVM.EventManager.Instance.Unsubscribe(OnTest); } private void OnTest(TestEvent evt) { print("TestEvent trigger!!!"); } } }