(First off, wanted to say it's been a pleasure using the PlayFab APIs/SDKs so far, and in addition to the docs, @Brendan's consistent posting of quality Q&A on here has been one of the driving factors to why it's been such a great experience, so thanks!)
Motivation
I'm hoping to use the C#/Unity Server Admin API on our CI server in order to upload a new server build, give it a game mode, and deprecate (most) older server builds
I've got most of that working over cURL calls, but since the Admin API has wonderful typed helpers and since I'd like to also allow uploading of servers via a Unity Editor menu, it would be ideal if I could make that all a shared code path.
Problem
I seem to run up against an issue where Enumerators are not run within the editor, and indeed Update()s do not end up getting called.
Supporting async within these batch Unity scripts is possible by running:
MakeSomePlayFabAPICalls(); while(!_isDone) { Thread.Sleep(100); } EditorApplication.Exit(0); // Set _isDone at some point in a final callback
I've played a tiny bit with trying to add in calls after the Thread.Sleep like:
EditorApplication.update(); PlayFabHttp.instance.Update(); // made public to test
but to no avail, as the _apiCallQueue in PlayFabHTTP starts empty and ends being null after the first call.
In short, is it possible to make Admin API calls work while running within a Unity build script (-batchmode -executeMethod)?
Alternatively, would you recommend a nice CI-friendly PlayFab library to use instead of cURL calls to manage servers?