#if UNITY_EDITOR using System; using System.Linq; using System.Reflection; using System.Threading.Tasks; public static class KVSaveRouteValidation { public static async Task RunAsync(string caseId) { if (caseId != "fixed-route") throw new ArgumentException("Unknown fixed validation case."); var assembly = AppDomain.CurrentDomain.GetAssemblies().Single(a => a.GetName().Name == "HotUpdate"); var type = assembly.GetType("game.PlayerDataStorage.PlayerKVSaveRouteEditorValidationHost", true); var method = type.GetMethod("RunAsync", BindingFlags.Static | BindingFlags.NonPublic, null, new[] { typeof(string) }, null); if (method == null) throw new InvalidOperationException("Validation entry unavailable."); return await (Task)method.Invoke(null, new object[] { caseId }); } } #endif