Unity6 may remain a process on iGPU environment when you closed the program

What Happend :
I’ve built a program and created an executable file using Inno Setup for distribution. However, on certain laptops (we tested 5 other devices, 3 of them had GPU, but 2 of them is not), when I run the program and then close it, the process still alived in the Windows Task Manager.

We are just assuming that the problem originates from the Unity graphics job; however, we have not yet identified the exact cause.

How can we reproduce it using the example you attached:
You can esaily find it out even if you built an empty project using Unity 6 with iGPU laptop. But, building and distributing with versions below Unity 6 works fine.

Temporary Solution:
Put the code on your project file.

protected void OnApplicationQuit()
    {
        if (!Application.isEditor)
        {
            StopAllCoroutines();
            Resources.UnloadUnusedAssets();
            System.Diagnostics.Process.GetCurrentProcess().Kill();
        } 
    }

Make sure without
if (!Application.isEditor)
Your Unity Editor would be shut down :slightly_smiling_face:

1 Like

This worked for me, thank you so much!

1 Like

happy to hear that

Hopefully they solve it soon, but this temporary solution worked for me too.

Thanks :slight_smile:

Hey, could you be running into this issue? Unity Issue Tracker - Player .exe remains open as a background task after closing it when Active Input Handling is set to "Input System Package (New)"