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