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