MarshMello0 / Editor-Rich-Presence

Show off what you're working on in unity with Editor Rich Presence on discord.
https://assetstore.unity.com/packages/tools/utilities/editor-rich-presence-178736#description
MIT License
60 stars 10 forks source link

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

Open emredesu opened 2 years ago

emredesu commented 2 years ago

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.

MarshMello0 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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