feat(upserver): 接入认证与KV存档并完成限定钓鱼闭环
This commit is contained in:
19
Client/Assets/Editor/KVSaveRouteValidation.cs
Normal file
19
Client/Assets/Editor/KVSaveRouteValidation.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
#if UNITY_EDITOR
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
public static class KVSaveRouteValidation
|
||||
{
|
||||
public static async Task<string> 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<string>)method.Invoke(null, new object[] { caseId });
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user