fix: locate live session recovery managers

This commit is contained in:
2026-10-03 01:29:33 +08:00
parent f7146adc3a
commit 9468fb3968
2 changed files with 6 additions and 7 deletions
+5 -6
View File
@@ -186,8 +186,8 @@ public sealed class Plugin : BaseUnityPlugin
}
try
{
object network = FindSGSingleton("Net");
object app = FindSGSingleton("App");
object network = FindUnitySingleton("BDNetwork.NetworkManager");
object app = FindUnitySingleton("AppManager");
MethodInfo refresh = network?.GetType().GetMethod(
"Refresh",
BindingFlags.Instance | BindingFlags.Public,
@@ -1092,11 +1092,10 @@ public sealed class Plugin : BaseUnityPlugin
return null;
}
private static object FindSGSingleton(string propertyName)
private static object FindUnitySingleton(string typeName)
{
Type sg = FindType("SG");
PropertyInfo property = sg?.GetProperty(propertyName, BindingFlags.Static | BindingFlags.Public);
return property?.GetValue(null);
Type type = FindType(typeName);
return type == null ? null : UnityEngine.Object.FindObjectOfType(type);
}
private static bool ProviderEnabled(string provider)
+1 -1
View File
@@ -6,6 +6,6 @@
"plugins": {
"local_identity": "0.6.0",
"capture_environment": "0.2.0",
"login_ui": "0.1.3"
"login_ui": "0.1.4"
}
}