diff --git a/TestVelGameServer/Packages/VelNetUnity/Runtime/VelNetManager.cs b/TestVelGameServer/Packages/VelNetUnity/Runtime/VelNetManager.cs index 167ee61..04a0dd2 100644 --- a/TestVelGameServer/Packages/VelNetUnity/Runtime/VelNetManager.cs +++ b/TestVelGameServer/Packages/VelNetUnity/Runtime/VelNetManager.cs @@ -93,6 +93,7 @@ namespace VelNet public static Action OnConnectedToServer; public static Action OnLoggedIn; public static Action RoomsReceived; + public static Action RoomDataReceived; public static Action MessageReceived; public static Action CustomMessageReceived; @@ -312,6 +313,15 @@ namespace VelNet case RoomDataMessage rdm: { Debug.Log("Got room data message:" + rdm.room); + try + { + RoomDataReceived?.Invoke(rdm); + } + // prevent errors in subscribers from breaking our code + catch (Exception e) + { + Debug.LogError(e); + } break; } case YouJoinedMessage jm: