thejinchao / turbolink

TurboLink is an unreal engine plugin enables Google gRPC work with Unreal Engine using C++ and Blueprint
MIT License
129 stars 32 forks source link

Game builds do not use settings for default or specific endpoints set in the editor under Project Settings -> Game #11

Closed Justin-Randall closed 1 year ago

Justin-Randall commented 1 year ago

The endpoint is empty when running a game build. It seems a bit too easy to do the wrong thing. If there is something else that should be done to build a game client rather than the editor that also has the correct endpoint settings, it is not in README.md, nor particularly clear that something is misconfigured.

Is this a bug, or a user error? How should the endpoint configuration be set in a game build?

For example, ConfigInstance appears to be empty in TurboLinkGrpcModule.cpp when WITH_EDITOR is not defined:

UTurboLinkGrpcConfig* FTurboLinkGrpcModule::GetTurboLinkGrpcConfig()
{
#if WITH_EDITOR
    return ConfigInstance->GetConfig();
#else
    return ConfigInstance;
#endif
}

It seems the changes made in the editor are not saved to DefaultGame.ini, as expected. They are captured elsewhere, so it looks like things work when in PIE. Cooking and running the game, however, does not seem to collect those changes.

Could be operator error on my part, but when I add config sections using UDeveloperSettings, they work as advertised.

thejinchao commented 1 year ago

Thanks for reminding, I did not pay attention to this issue before. My team usually writes the configuration files that need to be packaged into defaultgame.ini, which is packaged by the CI/CD process. I am still on vacation these days, and I will look at this problem after I go back to work, thanks again.

thejinchao commented 1 year ago

fixed, thanks