An UE4 project that integrates Discord's GameSDK as a new module.
- Download the repository as a ZIP file.
- Copy paste the module
Discord_GameSDK
located inGameWithDiscord/Source/
intoYourProjectName/Source
. - Open
yourProjectName/Source/yourProjectName.Target.cs
and replaceExtraModuleNames.AddRange( new string[] { "yourProjectName" } );
with this:ExtraModuleNames.AddRange( new string[] { "yourProjectName", "Discord_GameSDK" } );
- Open
yourProjectName/Source/yourProjectNameEditor.Target.cs
and replaceExtraModuleNames.AddRange( new string[] { "yourProjectName" } );
with this:ExtraModuleNames.AddRange( new string[] { "yourProjectName", "Discord_GameSDK" } );
- Open
yourProjectName/Source/yourProjectName/yourProjectName.Build.cs
and add this:
//Include Discord GameSDK library files
PublicIncludePaths.Add(@"D:\Repos\ParkourFPS\Source\DiscordSDK\discord-files");
PublicAdditionalLibraries.Add(@"D:\Repos\ParkourFPS\Binaries\Win64\discord_game_sdk.dll.lib");
#if PLATFORM_WINDOWS
#if PLATFORM_64BITS
RuntimeDependencies.Add("Binaries\Win64" + "discord_game_sdk.dll");
#else
RuntimeDependencies.Add("Binaries\Win64" + "discord_game_sdk.dll");
#endif
#elif PLATFORM_MAC
RuntimeDependencies.Add("Binaries\Win64" + discord_game_sdk.so);
#endif
#if PLATFORM_LINUX
RuntimeDependencies.Add("Binaries\Win64" + discord_game_sdk.dylib);
#endif
Note: when you package the project, it won't put the DLLs in the right folder. I haven't had the time to make this yet.
For now you'll have to put the DLLs and other files in the WindowsNoEditor
folder, or make the code for this yourself.
If you're having trouble with this, please take a look at how it's done in the example project.