using RichFrame.Event; using System.Collections; using System.Collections.Generic; using UnityEngine; public class EventManagerTest : MonoBehaviour { private void Awake() { EventManager.Instance.ListenEvent("a", Process); } // Start is called before the first frame update void Start() { EventManager.Instance.ExecuteEvent("a", 5, "hahaha"); EventManager.Instance.RemoveListener("a", Process); EventManager.Instance.ExecuteEvent("a", 5, "hahaha2"); } // Update is called once per frame void Update() { } void Process(int a, string b) { Debug.Log(a + ":" + b); } }