aws / amazon-gamelift-plugin-unreal

The Amazon GameLift Plugin for Unreal contains libraries and native UI that makes it easier to access GameLift resources and integrate GameLift into your Unreal game. You can use the GameLift Unreal Plugin to access GameLift APIs and deploy AWS CloudFormation templates for common gaming scenarios.
https://aws.amazon.com/gamelift/getting-started/
Apache License 2.0
32 stars 18 forks source link

Error importing GameLiftServerSDK module for v1.1.0 #40

Closed wenxiul closed 6 months ago

wenxiul commented 6 months ago

I encountered error running the built server executable with the new v1.1.0 release. Specifically, there's error importing the "GameLiftServerSDK" module into the gamlift plugin. This can be fixed by going to amazon-gamelift-plugin-unreal/GameLiftPlugin/Source/GameLiftServer/Source/GameLiftServerSDK/Private/GameLiftServerSDK.cpp and change line 30 and 31 from

FString BaseDir = IPluginManager::Get().FindPlugin("GameLiftServerSDK")->GetBaseDir();
const FString SDKDir = FPaths::Combine(*BaseDir, TEXT("ThirdParty"), TEXT("GameLiftServerSDK"));

to

FString BaseDir = IPluginManager::Get().FindPlugin("GameLiftPlugin")->GetBaseDir();
const FString SDKDir = FPaths::Combine(*BaseDir, TEXT("Source"), TEXT("GameLiftServer"), TEXT("ThirdParty"), TEXT("GameLiftServerSDK"));

and also deleting the amazon-gamelift-plugin-unreal/GameLiftPlugin/Source/GameLiftServer/GameLiftServerSDK.uplugin file. I expect others will encounter the same problem if you cloned the standalone code from github and directly copied the C++ Server SDK Plugin for Unreal source code into the amazon-gamelift-plugin-unreal/GameLiftPlugin/Source/GameLiftServer directory. Applying the above changes should fix the module import issue.