Skip to content

Conversation

Lachee
Copy link
Owner

@Lachee Lachee commented May 27, 2018

Created a fully fledge unity example. Still requires documentation, but provides all nessary features as well as bonus utillites

Lachee added 12 commits April 25, 2018 17:45
The basis of the example is done. Ideally there would be more, but I
will probably just keep it like this as to not disctract away from what
I am trying to convay.
Discord apparently sends the ID of the image sent back. This is totes
annoying and so I accounted for it with the new nullable unsigned long
values within the Assets field. When a Update Presence is now received,
it will instead of replacing the previous one, will merge them together.
The resulting presence from the merge will be exactly the received
presence, but with the keys of the last sent/received presence.
Just commiting the work I have done so far. Would do more, however the
discord client seems to be pretty broken at the moment
Discord thinks the Unity.exe process is your game process (since its
grabbing it for its ID as the game is being executed within the
Unity.exe). So when you stop playing you game and if you just abort the
pipe connection, Discord will keep the rich presence enabled (because it
thinks you just temporarly lost connection to the pipe and plan to
connect again later).
Resulting in a "ghost". I believe it has been reported in the offical
API. It is literally a unity only bug, but its a good idea to send the
close signal on close anyways
Still deciding if I want to make it always work that way or make it a
configuration option, since it does delay the releasing of system
resources
Apparently discord expects time to be sent in seconds, but will send it
back as milliseconds
Updating Build Settings & Readme
@Lachee Lachee merged commit cd29896 into master May 27, 2018
@Lachee Lachee deleted the unity-example branch January 20, 2019 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant