System.Diagnostics.Process.GetProcesses() is not working

Operating System : Windows 10 64bit

Unity Version : 2018.4.16f1

  • Target Achitecture : Windows Standalon 64bit
  • Scripting untime Version : .Net 4.x Equivalent
  • APi Compatiability Level : .NET Standard 2.0
  • Build Type : IL2CPP

I want to close process with ‘launcher’ string. so i did googling and find some solutions.

one solution is that use System.Diagnostics.Process class. it is worked properly in Unity Editor. it returns array of process class. but when i build my project with il2cpp and execute it, it is not worked. it just return empty array.
how can i run System.Diagnostics.Process.GetProcesses function properly on standalone build ?
please ~ somebody help me ~

IL2CPP does not implement any of the System.Diagnostics.Process code currently. So you will have two options for a Windows Standalone Player build:

  1. Use the Mono scripting backend
  2. Implement the process handling code in a native library and use p/invoke to call it from managed code in the Unity player.