Editor-Rich-Presence icon indicating copy to clipboard operation
Editor-Rich-Presence copied to clipboard

Plugin eventually crashes Discord after being on editor for around 2 hours

Open emredesu opened this issue 3 years ago • 3 comments

As the title suggests, I observe my Discord crashing after using Unity Editor with this plugin enabled for around 1.5 - 2 hours. The app doesn't close, but gets stuck in the "loading Discord" part where the logo spins.

After looking into the issue a bit, I see that the plugin sends multiple updates to Discord at once, and when I check the activity tab in my profile, I can see multiple instances of "Playing Unity" being shown with different timestamps. I believe that the Discord crash could be related to that.

emredesu avatar Nov 13 '21 13:11 emredesu

I have been spending a while looking into the multiple instances of playing unity and have found why it happens but sadly not how to fix it. Unity seems to dump all my variables when the script reloads happens, so I need to do some more research/asking around.

MarshMello0 avatar Dec 21 '21 14:12 MarshMello0

I added a little extra check to see if it could fix it. It didn't fix it while I was working on the scripts but it may work if you're working on a normal project which I haven't tested yet. If you want to have a go at 4.0.0 early you can get it from the repo directly by pulling it from the git repo.

I still need to set up a project to test it in.

MarshMello0 avatar Dec 22 '21 12:12 MarshMello0

An update, tested it today in another unity project and it still makes a ton of activitys.

MarshMello0 avatar Dec 27 '21 15:12 MarshMello0