From b99593485af663b1792957a5ff031a60eda753ea Mon Sep 17 00:00:00 2001 From: ImmutableJeffrey Date: Wed, 3 Sep 2025 17:22:40 +1000 Subject: [PATCH] fix: login failures on window il2cpp builds --- .../Runtime/Scripts/Private/Helpers/WindowsDeepLink.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Packages/Passport/Runtime/Scripts/Private/Helpers/WindowsDeepLink.cs b/src/Packages/Passport/Runtime/Scripts/Private/Helpers/WindowsDeepLink.cs index 1a6c948f..6b2b29c5 100644 --- a/src/Packages/Passport/Runtime/Scripts/Private/Helpers/WindowsDeepLink.cs +++ b/src/Packages/Passport/Runtime/Scripts/Private/Helpers/WindowsDeepLink.cs @@ -275,6 +275,8 @@ private static string GetGameExecutablePath(string suffix) if (suffix == ".exe") { // Get the path of the currently running executable +#if !ENABLE_IL2CPP + // Process.MainModule is only supported in Mono builds, not in IL2CPP, and will cause a crash try { var process = System.Diagnostics.Process.GetCurrentProcess(); @@ -291,6 +293,7 @@ private static string GetGameExecutablePath(string suffix) { PassportLogger.Warn($"Process inaccessible: {ex.Message}. Using fallback method."); } +#endif // Fallback: Use command line args var args = System.Environment.GetCommandLineArgs();