I'm trying to add discord rich presence in my game(made using Unity 2022.1, on Windows 10), but as many may know, trying to use rich presence when discord isn't open crashes the game/editor and opens discord.
My work around this has been using System.Diagnostics.Process.GetProcesses() to check if discord is open and running(by checking each returned value and seeing if they're equal to "System.Diagnostics.Process (Discord)")
The issue is, when within the editor(On windows) it works fine, but outside of the editor, still on Windows, it doesn't seem to, and I don't know why.(I've tested without that check, and discord's rich presence doesn't seem to be the cause of the issue)
How do I fix this? Is there an alternative way to check if discord is running?