fix: locate live session recovery managers
This commit is contained in:
@@ -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
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user