Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] RPC only works in editor, not in build. #1

Open
cryptogrounds opened this issue Jun 2, 2022 · 11 comments
Open

[BUG] RPC only works in editor, not in build. #1

cryptogrounds opened this issue Jun 2, 2022 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@cryptogrounds
Copy link

Describe the bug
Seems to work just fine in the Editor.
However, on build, it fails to get past the "[DRP] Discord Rich Presence intialized and connecting..." phase.

To Reproduce
Steps to reproduce the behavior:

  1. Build for Windows x86_64, IL2CPP, .NET 4.x
  2. Run the .exe, doesn't show up on Discord.

Expected behavior
The RPC should show up on Discord like it does when I run it in the editor.

Desktop (please complete the following information):

  • OS: Win 10
  • Framework: Unity 2020 .NET 4.x
  • Library Version: Lastest

Additional context
Regardless of the .dlls being in the Assets/Plugins folder or where they originally were when I imported the asset, it doesn't change the result.

Logs

[DRP] Starting Discord Rich Presence
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
DiscordManager:Initialize()

[DRP] Discord Rich Presence intialized and connecting...
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
DiscordManager:Initialize()
// Doesn't get past here.
@cryptogrounds cryptogrounds added the bug Something isn't working label Jun 2, 2022
@Lachee Lachee self-assigned this Jun 4, 2022
@cryptogrounds
Copy link
Author

Update:
I am using Log Level Info instead of warning. Seems that none of the IPC Log's are being called in the build.

Editor:
image

Build:
image

@cryptogrounds
Copy link
Author

Any updates on this? Trying to figure out whether I should switch to the native discord rpc till this has been fixed or wait.
Thank you.

@Lachee
Copy link
Owner

Lachee commented Jun 19, 2022

Ill look into this tomorrow. Very busy IRL and cannot commit full time to my projects.

@cryptogrounds
Copy link
Author

Very understandable, just wanted to check :)
Thank you!

@Lachee
Copy link
Owner

Lachee commented Jun 22, 2022

Very understandable, just wanted to check :) Thank you!

Sorry, taking slightly longer than expected to look into this. Perhaps this is a case of the native named pipe package not being included properly with the IL2CPP? Does it work with a Mono backend for you?

@cryptogrounds
Copy link
Author

Just tested it, appears it doesn't work with Mono backend. Log files get spammed with Created new NamedPipeClientStream 'discord-ipc-0' => '\\.\pipe\discord-ipc-0'.

@Lachee
Copy link
Owner

Lachee commented Jun 29, 2022

Just tested it, appears it doesn't work with Mono backend. Log files get spammed with Created new NamedPipeClientStream 'discord-ipc-0' => '\\.\pipe\discord-ipc-0'.

Hmm ok, so the package sounds like is broken and not using the native library properly.

@cryptogrounds
Copy link
Author

I noticed on the appveyor site, the most recent build failed as of 7 days ago. Could this have anything to do with it? Should I try downloading https://github.com/Lachee/unity-named-pipes manually?

@Lachee Lachee transferred this issue from Lachee/discord-rpc-csharp Aug 15, 2022
@asradesigning
Copy link

I have same problem my RPC is not updating on android build it is only working on editor.

@Lachee
Copy link
Owner

Lachee commented Mar 2, 2023

I have same problem my RPC is not updating on android build it is only working on editor.

This library doesn't support Android. I dont believe Discord actually supports Rich Presence on android yet either.

@Dan-Banfield
Copy link

I have same problem my RPC is not updating on android build it is only working on editor.

This library doesn't support Android. I dont believe Discord actually supports Rich Presence on android yet either.

Nah, it doesn't. RPC doesn't work on mobile :(.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants