mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
complete
This commit is contained in:
1 parent
ba293614eb
commit
56d510116d
20 files changed
+196
-25
No files matched your search
+10
-1
@@ -2,10 +2,15 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Newtonsoft.Json;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
|
||||
#if IL2CPP
|
||||
using System.Text.Json;
|
||||
#else
|
||||
using Newtonsoft.Json;
|
||||
#endif
|
||||
|
||||
namespace EHR;
|
||||
|
||||
public static class DevManager
|
||||
@@ -46,7 +51,11 @@ public static class DevManager
|
||||
try
|
||||
{
|
||||
string json = request.downloadHandler.text.Trim();
|
||||
#if IL2CPP
|
||||
Tags = JsonSerializer.Deserialize<Dictionary<string, TagInfo>>(json);
|
||||
#else
|
||||
Tags = JsonConvert.DeserializeObject<Dictionary<string, TagInfo>>(json);
|
||||
#endif
|
||||
Logger.Info($"Tags successfully fetched: {Tags.Count} tags loaded.", "DevManager.FetchTags");
|
||||
}
|
||||
catch (Exception ex) { Logger.Error($"Error parsing tags JSON: {ex.Message}", "DevManager.FetchTags"); }
|
||||
|
||||
Reference in new issue
Block a user