// Update is called once per frame void Update() { if (Input.GetMouseButtonDown(0)) { TypeEventSystem.Send(new A()); } if (Input.GetMouseButtonDown(1)) { TypeEventSystem.Send(new B()); } if (Input.GetKeyDown(KeyCode.U)) { TypeEventSystem.UnRegister <A>(ReceiveA); TypeEventSystem.UnRegister <B>(ReceiveB); } }
void Notify() { TypeEventSystem.Send(new NotifyEvent()); }