question

Markus Henschel avatar image
Markus Henschel asked

UnrealMarketplacePlugin: Changes to Storage of TitleId and DeveloperSecretKey break our Workflows in the Unreal Editor

Hi,

I just updated to the latest UE4 plugin and I'm trying to change our code to work again using this guide:

https://github.com/PlayFab/UnrealMarketplacePlugin/blob/master/UpgradeGuide_201207.md

We have problems with the way playfab changed the plugin. Previously it was easily possible to override TitleId and DeveloperSecretKey on runtime. Let me describe our use case quickly:

We do not want to put DeveloperSecetkey and TitleId into an ini file checked into the SCM. Our project deploys to multiple titles and we do not want our secret keys be in the projects repository. So what we do is read settings from command line in case of the dedicated server or client. Developers work in the unreal editor and in this case they have a title they can play around with. They can put TitleId and DeveloperSecretKey into a custom settings object which is persisted into a custom ini file that isn't part of source control but on the developers machine. We are really happy that we can debug the complete flow of the game in the editor where we can debug blueprints and iterate quickly.

With the latest change in the UE4 Plugin we face several issues:

1. The only place where we can configure TitleId/SecretKey is UPlayFabRuntimeSettings. This is persisted into DefaultEngine.ini of our game. This means it's very easy to accidentally have it being saved and submitted into the depot when a developer changes TitleId and DeveloperSecretKey locally.

2. If we put a developer secret key into UPlayFabRuntimeSettings we get checks triggered in the editor about a DeveloperSecretKey being present that in a client context (UPlayFabAuthenticationContext::ClientAdminSecurityCheck). I get what the check is intended for but the nature of testing things in the unreal editor is that you have server and client in the same process. Not being able to do this is really bad. Also inside of the editor checks are similar to a crash so in general it is bad practice to use them there unless you know a crash will happen and you want it to be easier to know why. Otherwise you risk people loosing work.

So either I'm overlooking something or this change wasn't really thought though regarding the typical workflow in the unreal editor for a multiplayer game. I think in general it would be good to get back a way to configure TitleId and DeveloperSecretKey without forcing it into an object that is persisted to an ini file that is usually part of source control (like DefaultEngine.ini). But at least we need a way to set a developer secret key in the editor so we can use client and server in the same process without checks being triggered.

I'm trying to come up with a workaround but it seems to me that the only thing I can do is to wrap every call of the server API with code that sets DeveloperSecretKey right before the call and resets it back assuming no calls are happening on another thread during that time. An alternative would be to change the playfab plugin code which I don't want since I want to be able to update to newer version without any effort.

I'm really trying to deal with the changes you made but I'd like the Playfab team to know about the issues they cause on our side.

Best Regards

Markus

sdksunreal
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Seth Du avatar image
Seth Du answered

It seems to be a feature request. Fell free to send a thread on https://community.playfab.com/spaces/24/index.html.

If you are in a paid subscription plan, you may submit a support ticket to the team so that one of our engineers will try to reach the SDK team to help you solve this issue. In my point of view, there should be more details of your project codes/BluePrint for troubleshooting, while the community forum is public.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Markus Henschel avatar image
Markus Henschel answered

Thanks for the reply. I will create a support ticket then.

Technically this could be a feature request to get back a feature that has been removed from the Unreal Plugin in an attempt to refactor the code. You could also technically call it a bug report since it breaks our workflows by placing a check statement into a place it shouldn't be in.

The gist of it is: Playfab did breaking changes to the Unreal Plugin. I'm not really sure if a feature request make any sense for this. I did a couple of those and voted on a couple of those but non of them really went anywhere. Since this is a unreal specific thing I would assume the chances are even lower that this will be tackled as a new feature.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Phil Woods avatar image
Phil Woods answered

We have just updated our plugin from version 1.45.200901 to 1.52.210111 and have run in to a similar issue.

We used to keep the DeveloperSecretKey in server only code, i.e. using #if UE_SERVER but now the DeveloperSecretKey is in a .ini for all to see.

We do have a an automated build pipeline, so we could push in the DeveloperSecretKey into the .ini before making the server builds and then strip out the DeveloperSecretKey before making a client build.

We were wondering whether there is a better approach. Is there a way to have server only .ini settings in the config files?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.