discord-rpc-csharp icon indicating copy to clipboard operation
discord-rpc-csharp copied to clipboard

[Unity] Doesn't work on player

Open TheGameratorT opened this issue 5 years ago • 9 comments

Discord RPC doesn't work if I build the application, only on the editor.

Using Unity 2018.3.12f1 Personal and lastest package

TheGameratorT avatar Apr 11 '19 10:04 TheGameratorT

Please give us more info. What does the logs say?

ghost avatar Apr 11 '19 11:04 ghost

I don't remember right now because I managed to implement the official discord one in my project but I think it said something related to pipes and it would get spammed across the log getting bigger and bigger.

I think my friend still has the old version of my game that couldn't connect, I will ask him for the log.

EDIT: My friend has been hearing the menu music so the log is now 121mb...

TheGameratorT avatar Apr 11 '19 12:04 TheGameratorT

It is trimmed but I added a text in the place where it got trimmed saying what was there. output_log_trim.txt

TheGameratorT avatar Apr 11 '19 13:04 TheGameratorT

Unfortunately this doesn't actually show any errors. Have you made sure you are only initialising it once per game and not constantly restarting? Did you make sure you included the native dll required for unity? Are you using .net 2 subset?

I know you said you swapped it out already, but a trace level log on a development build would have given more information

Lachee avatar Apr 11 '19 23:04 Lachee

He's right. When the game is compiled, Discord Presence doesn't work whatsoever. It doesn't appear in the client at all.

reithegoat avatar May 22 '19 03:05 reithegoat

Okay... Make sure you compiled the game as a 64-bits game, and go into Player Settings > Other Settings and then change API Compatibility level to .NET 4.X.

reithegoat avatar May 22 '19 03:05 reithegoat

Minimum requirements is .NET 2 (non-subset!). The package should include both 32bit and 64bit WINDOWS version of the native library. The Linux/MacOS versions are only available for 64bit

Lachee avatar May 22 '19 12:05 Lachee

Nope. Mine only came with the 64 bit version.

On Wed, May 22, 2019, 8:14 AM Lachee [email protected] wrote:

Minimum requirements is .NET 2 (non-subset!). The package should include both 32bit and 64bit WINDOWS version of the native library. The Linux/MacOS versions are only available for 64bit

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Lachee/discord-rpc-csharp/issues/61?email_source=notifications&email_token=ACZF3ETPY5GETYFC4TATXW3PWU2LRA5CNFSM4HFE34FKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODV63ELQ#issuecomment-494776878, or mute the thread https://github.com/notifications/unsubscribe-auth/ACZF3ESELGDODBJ3QN36B63PWU2LRANCNFSM4HFE34FA .

reithegoat avatar May 22 '19 14:05 reithegoat

It is probably getting stripped, so you need to include the package in a link.xml file

<linker>
<assembly fullname="DiscordRPC" preserve="all" />
</linker>

skjalgsm avatar Feb 07 '22 10:02 skjalgsm