diff --git a/osu.Game/Online/RealtimeMultiplayer/MultiplayerRoom.cs b/osu.Game/Online/RealtimeMultiplayer/MultiplayerRoom.cs index 1ba8d0c487..5704ddd675 100644 --- a/osu.Game/Online/RealtimeMultiplayer/MultiplayerRoom.cs +++ b/osu.Game/Online/RealtimeMultiplayer/MultiplayerRoom.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; +using Newtonsoft.Json; namespace osu.Game.Online.RealtimeMultiplayer { @@ -41,6 +42,7 @@ public class MultiplayerRoom private object writeLock = new object(); + [JsonConstructor] public MultiplayerRoom(in long roomId) { RoomID = roomId; diff --git a/osu.Game/Online/RealtimeMultiplayer/MultiplayerRoomUser.cs b/osu.Game/Online/RealtimeMultiplayer/MultiplayerRoomUser.cs index 60f1c9e42e..caf1a70197 100644 --- a/osu.Game/Online/RealtimeMultiplayer/MultiplayerRoomUser.cs +++ b/osu.Game/Online/RealtimeMultiplayer/MultiplayerRoomUser.cs @@ -4,6 +4,7 @@ #nullable enable using System; +using Newtonsoft.Json; using osu.Game.Users; namespace osu.Game.Online.RealtimeMultiplayer @@ -17,6 +18,7 @@ public class MultiplayerRoomUser : IEquatable public User? User { get; set; } + [JsonConstructor] public MultiplayerRoomUser(in int userId) { UserID = userId;