private void DispatchLoginEvent() { var e = new LoginEvent(LoginEvent.LOGIN) { Bubbles = true, // bubble event Username = Username, Password = Password }; Debug.Log("Dispatching an event, catch it from outside: " + e); DispatchEvent(e); }