vaporvee / discord-rpc-godot

Discord RPC Plugin for GDScript with an easy-to-use code pattern in Godot Engine 4, with optional Editor Rich Presence! (Compatible with Linux, Windows, & MacOS)
https://docs.vaporvee.com/discord-rpc-godot
MIT License
192 stars 10 forks source link

[Issue/Bug]: Game rely's on discord_game_sdk.dll #72

Open LukeCGG opened 6 days ago

LukeCGG commented 6 days ago

What happened?

Well, exporting the game, it all works exactly as intended, untill.. removing the dll from the same directory that the game exists in, just breaks everything? I mean the game still loads correctly, however my buttons dont work, it's running but missing script commands or something? I tried checking if the file exists and just not running the loading sequence, but that didnt seem to fix the issue. Normally this wouldnt be an issue, but since i'm trying to get the game to work on itch too, it's just, kinda unplayable right now, so if you have any tips on fixing this issue, that's be HUGE.

Cheers, Luke

Version

1.3.1

Godot Version

4.3-stable

Exact steps to reproduce this error

Only the exported version of the game while not in the same directory as the dll files has this issue. I get why it's happening, but wondering if theres a way to stop it happening if the files are not present.

GDScript

func _ready():
    if OS.has_feature("standalone"):
        var folder := OS.get_executable_path().get_base_dir()
        var file_name := folder + "/discord_game_sdk.dll"
        var globalfile = ProjectSettings.globalize_path(file_name)
        if FileAccess.file_exists(globalfile):
            _loadRPC()

Godot output

Debug for export doesnt seem to be loading or just not producing output.

Additional information

No response

Checks

vaporvee commented 6 days ago

try removing the files inside the export window. there must be a tab for excluding stuff. Also try something like in the last step of the trouble shooting guide. if that doesn't help give me the output of your game when you run it from cmd or shell with --verbose at the end

LukeCGG commented 5 days ago

Alright, i think i get whats going on with the troubleshooting 5 step, i'm just not really sure how i'm to implement it, so i've got the plugin disabled in the editor's settings, and added your example code, but i dont fully understand how it works. eg: When the plugin is disabled, all the 'DiscordRPC' commands become broken, and i dont quite understand how i can make it work with that. I'm really sorry that i'm probably missing something really obvious with it all, but could i just get a little bit more detail on only instantiating the plugin if it can be run? Thanks :D