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)
275
275
if ( suffix == ".exe" )
276
276
{
277
277
// 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
278
280
try
279
281
{
280
282
var process = System . Diagnostics . Process . GetCurrentProcess ( ) ;
@@ -291,6 +293,7 @@ private static string GetGameExecutablePath(string suffix)
291
293
{
292
294
PassportLogger . Warn ( $ "Process inaccessible: { ex . Message } . Using fallback method.") ;
293
295
}
296
+ #endif
294
297
295
298
// Fallback: Use command line args
296
299
var args = System . Environment . GetCommandLineArgs ( ) ;
You can’t perform that action at this time.
0 commit comments