AuthenticationValues should only be set when selfhosting/onprem. userid is ignored by photon cloud.

This commit is contained in:
2025-08-14 23:12:14 -04:00
parent 4a365ca94d
commit 8ca37170e4

View File

@@ -145,7 +145,6 @@ namespace undead_universal_patch_il2cpp.Patches
PhotonConfig.ServerPort.Value,
PhotonConfig.AppID.Value,
]);
}
Type authValuesType = AccessTools.TypeByName("AuthenticationValues");
if (authValuesType != null)
@@ -163,7 +162,7 @@ namespace undead_universal_patch_il2cpp.Patches
return;
}
string id = Core.Util.LocalInstanceGuid;
string id = Util.LocalInstanceGuid;
Util.ConditionalDebug($"Instance GUID is {id}");
PhotonNetwork.AuthValues = new AuthenticationValues
@@ -173,6 +172,7 @@ namespace undead_universal_patch_il2cpp.Patches
Util.ConditionalDebug($"Set the authValues userId to {id}");
}
}
UniversalPatchPlugin.Log.LogInfo($"Photon patch ({(PhotonConfig.SelfHosted.Value ? "self-hosted" : "cloud")}) succeeded.");
}