/// <summary> /// 游戏模块使用本函数发送消息给大厅模块 /// </summary> /// <param name="msgName"></param> /// <param name="msg">虽然类型是string,但是也可以发送protobuf的bytes</param> public void SendMsgToParentModule(string msgName, string msg) { if (parent == null) { Debug.LogError($"Module hub failed to send msg {msgName} to parent when parent is null"); return; } parent.EmitMsg(msgName, msg); }