private static void OnModdedplayerjoinReceived(string sender, string data) { ModdedUser mu = JsonConvert.DeserializeObject <ModdedUser>(data); lock (moddedUserList) { if (!moddedUserList.ContainsKey(mu.id)) { moddedUserList.Add(mu.id, mu); } } }
private static void OnModdedplayerjoinReceived(string sender, string data) { ModdedUser mu = JsonUtility.FromJson <ModdedUser>(data); lock (moddedUserList) { if (!moddedUserList.ContainsKey(mu.id)) { moddedUserList.Add(mu.id, mu); } } }
private static void OnModdedplayerlistonjoinReceived(string sender, string data) { ModdedUser[] muld = ModdedUser.ParseJson(data); lock (moddedUserList) { foreach (ModdedUser mu in muld) { if (!moddedUserList.ContainsKey(mu.id)) { moddedUserList.Add(mu.id, mu); } } } }