using System.Collections.Generic; using System.Runtime.InteropServices; using BestHTTP; using undead_universal_patch_il2cpp.Core.Content.UndeadGameManager; using undead_universal_patch_il2cpp.Patches.UndeadGameManager; using UnityEngine; namespace undead_universal_patch_il2cpp.Core.Content.CustomRecNet.CustomGameManager; public class CustomGameManager : MonoBehaviour { public void Start() { RecNetInteractions.postAuthenticationActions.Add(DownloadGameConfigAssets); } public void OnFailed([Optional] HTTPResponse res) { Util.ConditionalDebug($"CustomGameManager failed: HTTP Error {res.StatusCode}"); } public void Finished(HTTPResponse res, Dictionary configs) { GameConfiguratorPatch.gameConfig = configs; } public void DownloadGameConfigAssets() { RecNetInteractions.SendRequest>(HTTPMethods.Get, RecNet.Service.API, "/api/undead/v1/gameconfigassets", Finished, OnFailed); } }