File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
src/Packages/Passport/Runtime/Scripts/Private/Helpers Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -275,6 +275,8 @@ private static string GetGameExecutablePath(string suffix)
275275 if ( suffix == ".exe" )
276276 {
277277 // Get the path of the currently running executable
278+ #if ! ENABLE_IL2CPP
279+ // Process.MainModule is only supported in Mono builds, not in IL2CPP, and will cause a crash
278280 try
279281 {
280282 var process = System . Diagnostics . Process . GetCurrentProcess ( ) ;
@@ -291,6 +293,7 @@ private static string GetGameExecutablePath(string suffix)
291293 {
292294 PassportLogger . Warn ( $ "Process inaccessible: { ex . Message } . Using fallback method.") ;
293295 }
296+ #endif
294297
295298 // Fallback: Use command line args
296299 var args = System . Environment . GetCommandLineArgs ( ) ;
You can’t perform that action at this time.
0 commit comments