ERROR: Does not have a library for the current platform
Closed this issue · 4 comments
Loading the project in Godot Engine with the plugin enabled brings up the following errors:
Running the game from the editor works without any other errors, and Discord Rich Presence to work in this scenario.
Exporting the game causes it to fail entirely.
Not sure if it's related to the above issues.
The following export filter was used, which should include the required addons.
Any idea why this is happening?
I'm using Windows 10 Pro.
Ok lol I'm seeing this with the exported project. It starts, then Discord pops up. Then the game exits.
This is happening because I left some debug code in by accident. Can you confirm this is your issue by going into the Discord autoload script and removing:
if OS.has_feature("standalone"):
OS.set_environment("DISCORD_INSTANCE_ID", "1")
else:
OS.set_environment("DISCORD_INSTANCE_ID", "0")
Also you shouldn't need to have an extra filters on your export, if you're not seeing the two shared libraries "discord-game-sdk-godot.dll" & "discord_game_sdk.dll" exported along side you exe and .pck, then make sure you uncheck "Embed PCK" in the export dialog..
Yup, commenting that code fixes it, and now it works flawlessly!
Worth noting: the plugin seems to only work in 64-bit mode.
That's one more mistake I was making: initially exported the game in 32-bit (I know there's very few people who use 32-bit anymore, but I'll take any bit of reach I can get, not like my game suffers any performance issues).
Ah, I had one more question @samsface:
Is there any way to make the game run without Discord? I've tried looking through the Discord Developer Portal documentation, but I haven't been able to understand it.
Right now I need Discord running to launch my game, otherwise the game just launches Discord, but won't run itself.
(I can open another issue for this if you'd like).
Awesome that it works. Yeah open another issue please 🙏 . I've noticed this too, it's kinda Discords bad but maybe I can work around it.