diff --git a/Assets/PlayFabEditorExtensions.meta b/Assets/PlayFabEditorExtensions.meta index 7715d4ed82d5a350714bf5cf9b91417f9dff6c73..b0a06f562fae7dab2e87fdf80a5915d6363fddfd 100644 --- a/Assets/PlayFabEditorExtensions.meta +++ b/Assets/PlayFabEditorExtensions.meta @@ -1,8 +1,9 @@ fileFormatVersion: 2 guid: e6b6b62449f1f4ed1bdf033d7f2d2ccf folderAsset: yes +timeCreated: 1470764459 +licenseType: Pro DefaultImporter: - externalObjects: {} userData: assetBundleName: assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor.meta b/Assets/PlayFabEditorExtensions/Editor.meta index 2117055e042b567c88dc957ae423cd7eedb2bc8d..7e91acb98e56c9cea723a82e9c9fed7663f53580 100644 --- a/Assets/PlayFabEditorExtensions/Editor.meta +++ b/Assets/PlayFabEditorExtensions/Editor.meta @@ -1,8 +1,9 @@ fileFormatVersion: 2 guid: c897fef01cc7d7d4a84f9f114b5133c6 folderAsset: yes +timeCreated: 1466049927 +licenseType: Pro DefaultImporter: - externalObjects: {} userData: assetBundleName: assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/PlayFabEditor.cs b/Assets/PlayFabEditorExtensions/Editor/PlayFabEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..22525ebe50fbb8638749e7cce74f08c8edb35fda --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/PlayFabEditor.cs @@ -0,0 +1,433 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using UnityEditor; +using UnityEngine; + +namespace PlayFab.PfEditor +{ + public class PlayFabEditor : UnityEditor.EditorWindow + { +#if !UNITY_5_3_OR_NEWER + public GUIContent titleContent; +#endif + + #region EdEx Variables + // vars for the plugin-wide event system + public enum EdExStates { OnLogin, OnLogout, OnMenuItemClicked, OnSubmenuItemClicked, OnHttpReq, OnHttpRes, OnError, OnSuccess, OnWarning } + + public delegate void PlayFabEdExStateHandler(EdExStates state, string status, string misc); + public static event PlayFabEdExStateHandler EdExStateUpdate; + + public static Dictionary blockingRequests = new Dictionary(); // key and blockingRequest start time + private static float blockingRequestTimeOut = 10f; // abandon the block after this many seconds. + + public static string latestEdExVersion = string.Empty; + + internal static PlayFabEditor window; + #endregion + + #region unity lopps & methods + void OnEnable() + { + if (window == null) + { + window = this; + window.minSize = new Vector2(320, 0); + } + + if (!IsEventHandlerRegistered(StateUpdateHandler)) + { + EdExStateUpdate += StateUpdateHandler; + } + + PlayFabEditorDataService.RefreshStudiosList(true); + GetLatestEdExVersion(); + } + + void OnDisable() + { + // clean up objects: + PlayFabEditorPrefsSO.Instance.PanelIsShown = false; + + if (IsEventHandlerRegistered(StateUpdateHandler)) + { + EdExStateUpdate -= StateUpdateHandler; + } + } + + void OnFocus() + { + OnEnable(); + } + + [MenuItem("Window/PlayFab/Editor Extensions")] + static void PlayFabServices() + { + var editorAsm = typeof(UnityEditor.Editor).Assembly; + var inspWndType = editorAsm.GetType("UnityEditor.SceneHierarchyWindow"); + + if (inspWndType == null) + { + inspWndType = editorAsm.GetType("UnityEditor.InspectorWindow"); + } + + window = GetWindow(inspWndType); + window.titleContent = new GUIContent("PlayFab EdEx"); + PlayFabEditorPrefsSO.Instance.PanelIsShown = true; + } + + [InitializeOnLoad] + public static class Startup + { + static Startup() + { + if (PlayFabEditorPrefsSO.Instance.PanelIsShown || !PlayFabEditorSDKTools.IsInstalled) + { + EditorCoroutine.Start(OpenPlayServices()); + } + } + } + + static IEnumerator OpenPlayServices() + { + yield return new WaitForSeconds(1f); + if (!Application.isPlaying) + { + PlayFabServices(); + } + } + + private void OnGUI() + { + HideRepaintErrors(OnGuiInternal); + } + + private void OnGuiInternal() + { + GUI.skin = PlayFabEditorHelper.uiStyle; + + using (new UnityVertical()) + { + //Run all updaters prior to drawing; + PlayFabEditorHeader.DrawHeader(); + + GUI.enabled = blockingRequests.Count == 0 && !EditorApplication.isCompiling; + + if (PlayFabEditorAuthenticate.IsAuthenticated()) + { + PlayFabEditorMenu.DrawMenu(); + + switch (PlayFabEditorMenu._menuState) + { + case PlayFabEditorMenu.MenuStates.Sdks: + PlayFabEditorSDKTools.DrawSdkPanel(); + break; + case PlayFabEditorMenu.MenuStates.Settings: + PlayFabEditorSettings.DrawSettingsPanel(); + break; + case PlayFabEditorMenu.MenuStates.Help: + PlayFabEditorHelpMenu.DrawHelpPanel(); + break; + case PlayFabEditorMenu.MenuStates.Data: + PlayFabEditorDataMenu.DrawDataPanel(); + break; + case PlayFabEditorMenu.MenuStates.Tools: + PlayFabEditorToolsMenu.DrawToolsPanel(); + break; + case PlayFabEditorMenu.MenuStates.Packages: + PlayFabEditorPackages.DrawPackagesMenu(); + break; + default: + break; + } + } + else + { + PlayFabEditorAuthenticate.DrawAuthPanels(); + } + + using (new UnityVertical(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1"), GUILayout.ExpandHeight(true), GUILayout.ExpandWidth(true))) + { + GUILayout.FlexibleSpace(); + } + + // help tag at the bottom of the help menu. + if (PlayFabEditorMenu._menuState == PlayFabEditorMenu.MenuStates.Help) + { + DisplayHelpMenu(); + } + } + + PruneBlockingRequests(); + + Repaint(); + } + + private static void HideRepaintErrors(Action action) + { + try + { + action(); + } + catch (Exception e) + { + if (!e.Message.ToLower().Contains("repaint")) + throw; + // Hide any repaint issues when recompiling + } + } + + private static void DisplayHelpMenu() + { + using (new UnityVertical(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1"))) + { + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + GUILayout.FlexibleSpace(); + EditorGUILayout.LabelField("PlayFab Editor Extensions: " + PlayFabEditorHelper.EDEX_VERSION, PlayFabEditorHelper.uiStyle.GetStyle("versionText")); + GUILayout.FlexibleSpace(); + } + + //TODO Add plugin upgrade option here (if available); + if (ShowEdExUpgrade()) + { + using (new UnityHorizontal()) + { + GUILayout.FlexibleSpace(); + if (GUILayout.Button("UPGRADE EDEX", PlayFabEditorHelper.uiStyle.GetStyle("textButtonOr"))) + { + UpgradeEdEx(); + } + GUILayout.FlexibleSpace(); + } + } + + using (new UnityHorizontal()) + { + GUILayout.FlexibleSpace(); + if (GUILayout.Button("VIEW DOCUMENTATION", PlayFabEditorHelper.uiStyle.GetStyle("textButton"))) + { + Application.OpenURL("https://github.com/PlayFab/UnityEditorExtensions"); + } + GUILayout.FlexibleSpace(); + } + + using (new UnityHorizontal()) + { + GUILayout.FlexibleSpace(); + if (GUILayout.Button("REPORT ISSUES", PlayFabEditorHelper.uiStyle.GetStyle("textButton"))) + { + Application.OpenURL("https://github.com/PlayFab/UnityEditorExtensions/issues"); + } + GUILayout.FlexibleSpace(); + } + + if (!string.IsNullOrEmpty(PlayFabEditorHelper.EDEX_ROOT)) + { + using (new UnityHorizontal()) + { + GUILayout.FlexibleSpace(); + if (GUILayout.Button("UNINSTALL ", PlayFabEditorHelper.uiStyle.GetStyle("textButton"))) + { + RemoveEdEx(); + } + GUILayout.FlexibleSpace(); + } + } + } + } + #endregion + + #region menu and helper methods + public static void RaiseStateUpdate(EdExStates state, string status = null, string json = null) + { + if (EdExStateUpdate != null) + EdExStateUpdate(state, status, json); + } + + private static void PruneBlockingRequests() + { + List itemsToRemove = new List(); + foreach (var req in blockingRequests) + if (req.Value + blockingRequestTimeOut < (float)EditorApplication.timeSinceStartup) + itemsToRemove.Add(req.Key); + + foreach (var item in itemsToRemove) + { + ClearBlockingRequest(item); + RaiseStateUpdate(EdExStates.OnWarning, string.Format(" Request {0} has timed out after {1} seconds.", item, blockingRequestTimeOut)); + } + } + + private static void AddBlockingRequest(string state) + { + blockingRequests[state] = (float)EditorApplication.timeSinceStartup; + } + + private static void ClearBlockingRequest(string state = null) + { + if (state == null) + { + blockingRequests.Clear(); + } + else if (blockingRequests.ContainsKey(state)) + { + blockingRequests.Remove(state); + } + } + + /// + /// Handles state updates within the editor extension. + /// + /// the state that triggered this event. + /// a generic message about the status. + /// a generic container for additional JSON encoded info. + private void StateUpdateHandler(EdExStates state, string status, string json) + { + switch (state) + { + case EdExStates.OnMenuItemClicked: + PlayFabEditorPrefsSO.Instance.curSubMenuIdx = 0; + break; + + case EdExStates.OnSubmenuItemClicked: + int parsed; + if (int.TryParse(json, out parsed)) + PlayFabEditorPrefsSO.Instance.curSubMenuIdx = parsed; + break; + + case EdExStates.OnHttpReq: + object temp; + if (string.IsNullOrEmpty(json) || Json.PlayFabSimpleJson.TryDeserializeObject(json, out temp)) + break; + + var deserialized = temp as Json.JsonObject; + object useSpinner = false; + object blockUi = false; + + if (deserialized.TryGetValue("useSpinner", out useSpinner) && bool.Parse(useSpinner.ToString())) + { + ProgressBar.UpdateState(ProgressBar.ProgressBarStates.spin); + } + + if (deserialized.TryGetValue("blockUi", out blockUi) && bool.Parse(blockUi.ToString())) + { + AddBlockingRequest(status); + } + break; + + case EdExStates.OnHttpRes: + ProgressBar.UpdateState(ProgressBar.ProgressBarStates.off); + ProgressBar.UpdateState(ProgressBar.ProgressBarStates.success); + ClearBlockingRequest(status); + break; + + case EdExStates.OnError: + // deserialize and add json details + // clear blocking requests + ProgressBar.UpdateState(ProgressBar.ProgressBarStates.error); + ClearBlockingRequest(); + Debug.LogError(string.Format("PlayFab EditorExtensions: Caught an error:{0}", status)); + break; + + case EdExStates.OnWarning: + ProgressBar.UpdateState(ProgressBar.ProgressBarStates.warning); + ClearBlockingRequest(); + Debug.LogWarning(string.Format("PlayFab EditorExtensions: {0}", status)); + break; + + case EdExStates.OnSuccess: + ClearBlockingRequest(); + ProgressBar.UpdateState(ProgressBar.ProgressBarStates.success); + break; + } + } + + public static bool IsEventHandlerRegistered(PlayFabEdExStateHandler prospectiveHandler) + { + if (EdExStateUpdate == null) + return false; + + foreach (PlayFabEdExStateHandler existingHandler in EdExStateUpdate.GetInvocationList()) + if (existingHandler == prospectiveHandler) + return true; + return false; + } + + private static void GetLatestEdExVersion() + { + var threshold = PlayFabEditorPrefsSO.Instance.EdSet_lastEdExVersionCheck != DateTime.MinValue ? PlayFabEditorPrefsSO.Instance.EdSet_lastEdExVersionCheck.AddHours(1) : DateTime.MinValue; + + if (DateTime.Today > threshold) + { + PlayFabEditorHttp.MakeGitHubApiCall("https://api.github.com/repos/PlayFab/UnityEditorExtensions/git/refs/tags", (version) => + { + latestEdExVersion = version ?? "Unknown"; + PlayFabEditorPrefsSO.Instance.EdSet_latestEdExVersion = latestEdExVersion; + }); + } + else + { + latestEdExVersion = PlayFabEditorPrefsSO.Instance.EdSet_latestEdExVersion; + } + } + + private static bool ShowEdExUpgrade() + { + if (string.IsNullOrEmpty(latestEdExVersion) || latestEdExVersion == "Unknown") + return false; + + if (string.IsNullOrEmpty(PlayFabEditorHelper.EDEX_VERSION) || PlayFabEditorHelper.EDEX_VERSION == "Unknown") + return true; + + string[] currrent = PlayFabEditorHelper.EDEX_VERSION.Split('.'); + if (currrent.Length != 3) + return true; + + string[] latest = latestEdExVersion.Split('.'); + return latest.Length != 3 + || int.Parse(latest[0]) > int.Parse(currrent[0]) + || int.Parse(latest[1]) > int.Parse(currrent[1]) + || int.Parse(latest[2]) > int.Parse(currrent[2]); + } + + private static void RemoveEdEx(bool prompt = true) + { + if (prompt && !EditorUtility.DisplayDialog("Confirm Editor Extensions Removal", "This action will remove PlayFab Editor Extensions from the current project.", "Confirm", "Cancel")) + return; + + try + { + window.Close(); + var edExRoot = new DirectoryInfo(PlayFabEditorHelper.EDEX_ROOT); + FileUtil.DeleteFileOrDirectory(edExRoot.Parent.FullName); + AssetDatabase.Refresh(); + } + catch (Exception ex) + { + RaiseStateUpdate(EdExStates.OnError, ex.Message); + } + } + + private static void UpgradeEdEx() + { + if (EditorUtility.DisplayDialog("Confirm EdEx Upgrade", "This action will remove the current PlayFab Editor Extensions and install the lastet version.", "Confirm", "Cancel")) + { + window.Close(); + ImportLatestEdEx(); + } + } + + private static void ImportLatestEdEx() + { + PlayFabEditorHttp.MakeDownloadCall("https://api.playfab.com/sdks/download/unity-edex-upgrade", (fileName) => + { + AssetDatabase.ImportPackage(fileName, false); + Debug.Log("PlayFab EdEx Upgrade: Complete"); + }); + } + #endregion + } +} diff --git a/Assets/PlayFabEditorExtensions/Editor/PlayFabEditor.cs.meta b/Assets/PlayFabEditorExtensions/Editor/PlayFabEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..998b68ee58cf97a6dbee754d05d3842ff80528e2 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/PlayFabEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1c7b3fb0903da7c48a812037b700de8b +timeCreated: 1465552796 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/PlayFabEditorExtensions.asmdef b/Assets/PlayFabEditorExtensions/Editor/PlayFabEditorExtensions.asmdef new file mode 100644 index 0000000000000000000000000000000000000000..310319d9ecdf9ba77c50bf68cf53d09cc62be878 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/PlayFabEditorExtensions.asmdef @@ -0,0 +1,14 @@ +{ + "name": "PlayFabEditorExtensions", + "references": [], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [] +} \ No newline at end of file diff --git a/Assets/PlayFabEditorExtensions/Editor/PlayFabEditorExtensions.asmdef.meta b/Assets/PlayFabEditorExtensions/Editor/PlayFabEditorExtensions.asmdef.meta new file mode 100644 index 0000000000000000000000000000000000000000..836b2db456c7c3baa34b1dfbd28216ea0ce24f5a --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/PlayFabEditorExtensions.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8f342294dfb958a4694b67859092b749 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Resources/PlayFabEditorPrefsSO.asset b/Assets/PlayFabEditorExtensions/Editor/Resources/PlayFabEditorPrefsSO.asset new file mode 100644 index 0000000000000000000000000000000000000000..7f0195c3d8aa12b265e796fe051531a645dfdae1 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Resources/PlayFabEditorPrefsSO.asset @@ -0,0 +1,23 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5d0199c11aa6f514784c5c69cd8378d8, type: 3} + m_Name: PlayFabEditorPrefsSO + m_EditorClassIdentifier: + DevAccountEmail: vikszpedison@gmail.com + DevAccountToken: q7ekk6qs4parygj9kn1jxxjkbj3rn436qpjkfdr8y6g65mippinkemort165obzrw6j5y6rj7exqmgrk4e1dhgf7ia67jxrr6ogy74osxuggf5zsh41ig49t8nsnwfxsuhkckym8439s3u9tji9mdxotiyaxm365cogc65piacyj6poebw9z3szsy9kdzzk877bzimne + SelectedStudio: My Game Studio + SdkPath: Assets/PlayFabSDK + EdExPath: + LocalCloudScriptPath: + PanelIsShown: 0 + curMainMenuIdx: 0 + curSubMenuIdx: 0 diff --git a/Assets/PlayFabEditorExtensions/Editor/Resources/PlayFabEditorPrefsSO.asset.meta b/Assets/PlayFabEditorExtensions/Editor/Resources/PlayFabEditorPrefsSO.asset.meta new file mode 100644 index 0000000000000000000000000000000000000000..15102976714d685fa431a4f3420908a3ea38359f --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Resources/PlayFabEditorPrefsSO.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7f0f895d20658f142a06dc4fb49dce02 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Resources/PlayFabUnitySdk.unitypackage.meta b/Assets/PlayFabEditorExtensions/Editor/Resources/PlayFabUnitySdk.unitypackage.meta index af11abc7e1e7754053d939c9a16bc2e680c98c27..4356fa5789828bc01d3719e5fca78df1aa817f9d 100644 --- a/Assets/PlayFabEditorExtensions/Editor/Resources/PlayFabUnitySdk.unitypackage.meta +++ b/Assets/PlayFabEditorExtensions/Editor/Resources/PlayFabUnitySdk.unitypackage.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 38eed5a7af1a0b6489bc6f7b82e3536d +guid: 0606dd0ceeb317040b982df7ba2ba573 DefaultImporter: externalObjects: {} userData: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts.meta index d813b069f6ec0dde5f4fe1dff36562adf63fde0f..9d68bd9dc7bb4f36ba4cfb272a8a43130e5427e7 100644 --- a/Assets/PlayFabEditorExtensions/Editor/Scripts.meta +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts.meta @@ -1,3 +1,9 @@ -fileFormatVersion: 2 -guid: b90830a6456443f88c042bc7ca92eea3 -timeCreated: 1628803751 \ No newline at end of file +fileFormatVersion: 2 +guid: 8d80bca4081cfd248bd0e0fa9421ea4d +folderAsset: yes +timeCreated: 1465794443 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Components.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components.meta index 40b08f15929860c9c1d4b4490326579290f1534c..2557f2abcdeeca1c0a2d2b94891677b412f6e054 100644 --- a/Assets/PlayFabEditorExtensions/Editor/Scripts/Components.meta +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components.meta @@ -1,3 +1,9 @@ -fileFormatVersion: 2 -guid: 07268edc4a6a4822b54fb297c07b2312 -timeCreated: 1628803764 \ No newline at end of file +fileFormatVersion: 2 +guid: 51d28a86064544e8e8b3560b7b28b3d7 +folderAsset: yes +timeCreated: 1471296960 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/ProgressBar.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/ProgressBar.cs new file mode 100644 index 0000000000000000000000000000000000000000..6be9340eb2c81c085d65658a8631f6bc72181d32 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/ProgressBar.cs @@ -0,0 +1,155 @@ +using UnityEditor; +using UnityEngine; + +namespace PlayFab.PfEditor +{ + public class ProgressBar + { + public enum ProgressBarStates { off = 0, on = 1, spin = 2, error = 3, warning = 4, success = 5 } + public static ProgressBarStates currentProgressBarState = ProgressBarStates.off; + + public static float progress = 0; + private static GUIStyle pbarStyle = PlayFabEditorHelper.uiStyle.GetStyle("progressBarFg"); + private static GUIStyle pbarBgStyle = PlayFabEditorHelper.uiStyle.GetStyle("progressBarBg"); + + private static float progressWidth = 0; + private static float animationSpeed = 1f; + private static float tickRate = .15f; + private static float stTime; + private static float endTime; + private static float lastUpdateTime; + private static bool isReveresed; + + public static void UpdateState(ProgressBarStates state) + { + if (currentProgressBarState == ProgressBarStates.off && state != ProgressBarStates.off) + { + stTime = (float)EditorApplication.timeSinceStartup; + endTime = stTime + animationSpeed; + } + + currentProgressBarState = state; + } + + //not a good way to do this right now. + public static void UpdateProgress(float p) + { + progress = p; + } + + public static void Draw() + { + pbarBgStyle = PlayFabEditorHelper.uiStyle.GetStyle("progressBarBg"); + if (currentProgressBarState == ProgressBarStates.off) + { + stTime = 0; + endTime = 0; + progressWidth = 0; + lastUpdateTime = 0; + isReveresed = false; + + progressWidth = EditorGUIUtility.currentViewWidth; + pbarStyle = PlayFabEditorHelper.uiStyle.GetStyle("progressBarClear"); + pbarBgStyle = PlayFabEditorHelper.uiStyle.GetStyle("progressBarClear"); + //return; + } + else if (EditorWindow.focusedWindow != PlayFabEditor.window) + { + // pause draw while we are in the bg + return; + } + else if (currentProgressBarState == ProgressBarStates.success) + { + if ((float)EditorApplication.timeSinceStartup - stTime < animationSpeed) + { + progressWidth = EditorGUIUtility.currentViewWidth; + pbarStyle = PlayFabEditorHelper.uiStyle.GetStyle("progressBarSuccess"); + } + else if (PlayFabEditor.blockingRequests.Count > 0) + { + UpdateState(ProgressBarStates.spin); + } + else + { + UpdateState(ProgressBarStates.off); + } + } + else if (currentProgressBarState == ProgressBarStates.warning) + { + if ((float)EditorApplication.timeSinceStartup - stTime < animationSpeed) + { + progressWidth = EditorGUIUtility.currentViewWidth; + pbarStyle = PlayFabEditorHelper.uiStyle.GetStyle("progressBarWarn"); + } + else if (PlayFabEditor.blockingRequests.Count > 0) + { + UpdateState(ProgressBarStates.spin); + } + else + { + UpdateState(ProgressBarStates.off); + } + } + else if (currentProgressBarState == ProgressBarStates.error) + { + if ((float)EditorApplication.timeSinceStartup - stTime < animationSpeed) + { + progressWidth = EditorGUIUtility.currentViewWidth; + pbarStyle = PlayFabEditorHelper.uiStyle.GetStyle("progressBarError"); + } + else if (PlayFabEditor.blockingRequests.Count > 0) + { + UpdateState(ProgressBarStates.spin); + } + else + { + UpdateState(ProgressBarStates.off); + } + } + else + { + + if ((float)EditorApplication.timeSinceStartup - lastUpdateTime > tickRate) + { + lastUpdateTime = (float)EditorApplication.timeSinceStartup; + pbarStyle = PlayFabEditorHelper.uiStyle.GetStyle("progressBarFg"); + + if (currentProgressBarState == ProgressBarStates.on) + { + progressWidth = EditorGUIUtility.currentViewWidth * progress; + } + else if (currentProgressBarState == ProgressBarStates.spin) + { + var currentTime = (float)EditorApplication.timeSinceStartup; + if (currentTime < endTime && !isReveresed) + { + UpdateProgress((currentTime - stTime) / animationSpeed); + progressWidth = EditorGUIUtility.currentViewWidth * progress; + } + else if (currentTime < endTime && isReveresed) + { + UpdateProgress((currentTime - stTime) / animationSpeed); + progressWidth = EditorGUIUtility.currentViewWidth - EditorGUIUtility.currentViewWidth * progress; + } + else + { + isReveresed = !isReveresed; + stTime = (float)EditorApplication.timeSinceStartup; + endTime = stTime + animationSpeed; + } + } + } + + } + + using (new UnityHorizontal(pbarBgStyle)) + { + if (isReveresed) + { + GUILayout.FlexibleSpace(); + } + EditorGUILayout.LabelField("", pbarStyle, GUILayout.Width(progressWidth)); + } + } + } +} diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/ProgressBar.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/ProgressBar.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..b0bbc892cee3560946a46b9596d49a48697b20bd --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/ProgressBar.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 73c59009a8870444f8f5658099fc86f8 +timeCreated: 1471388208 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/SubMenuComponent.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/SubMenuComponent.cs new file mode 100644 index 0000000000000000000000000000000000000000..914308b494847fadf535dade09fed28dce8afb41 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/SubMenuComponent.cs @@ -0,0 +1,102 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace PlayFab.PfEditor +{ + //[InitializeOnLoad] + public class SubMenuComponent : UnityEditor.Editor + { + + Dictionary items = new Dictionary(); + GUIStyle selectedStyle; + GUIStyle defaultStyle; + GUIStyle bgStyle; + + public void DrawMenu() + { + selectedStyle = selectedStyle ?? PlayFabEditorHelper.uiStyle.GetStyle("textButton_selected"); + defaultStyle = defaultStyle ?? PlayFabEditorHelper.uiStyle.GetStyle("textButton"); + bgStyle = bgStyle ?? PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1"); + + using (new UnityHorizontal(bgStyle, GUILayout.ExpandWidth(true))) + { + foreach (var item in items) + { + var styleToUse = item.Value.isSelected ? selectedStyle : defaultStyle; + var content = new GUIContent(item.Value.displayName); + var size = styleToUse.CalcSize(content); + + if (GUILayout.Button(item.Value.displayName, styleToUse, GUILayout.Width(size.x + 1))) + { + OnMenuItemClicked(item.Key); + } + } + } + } + + public void RegisterMenuItem(string n, System.Action m) + { + if (!items.ContainsKey(n)) + { + var selectState = false; + var activeSubmenu = PlayFabEditorPrefsSO.Instance.curSubMenuIdx; + if (items.Count == 0 && activeSubmenu == 0 || activeSubmenu == items.Count) + selectState = true; + + items.Add(n, new MenuItemContainer() { displayName = n, method = m, isSelected = selectState }); + } + } + + private void OnMenuItemClicked(string key) + { + if (!items.ContainsKey(key)) + return; + + DeselectAll(); + items[key].isSelected = true; + if (items[key].method != null) + { + items[key].method.Invoke(); + } + } + + private void DeselectAll() + { + foreach (var item in items) + { + item.Value.isSelected = false; + } + } + + public SubMenuComponent() + { + if (!PlayFabEditor.IsEventHandlerRegistered(StateUpdateHandler)) + { + PlayFabEditor.EdExStateUpdate += StateUpdateHandler; + } + } + + void StateUpdateHandler(PlayFabEditor.EdExStates state, string status, string json) + { + switch (state) + { + case PlayFabEditor.EdExStates.OnMenuItemClicked: + DeselectAll(); + if (items != null) + foreach (var each in items) + { + each.Value.isSelected = true; // Select the first + break; + } + break; + } + } + } + + public class MenuItemContainer + { + public string displayName; + public System.Action method; + public bool isSelected; + } +} diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/SubMenuComponent.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/SubMenuComponent.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..960ed10728b352f9732fe14bc23c2a910e1f098a --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/SubMenuComponent.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5a2670b1b9ccb4eefa83498d43ab0c8a +timeCreated: 1474667971 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleDataEditor.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleDataEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..7e9abfd35c46a4c0fb8cb6fbe1cca0f87f20ab56 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleDataEditor.cs @@ -0,0 +1,54 @@ +using UnityEditor; +using UnityEngine; + +namespace PlayFab.PfEditor +{ + public class TitleDataEditor : UnityEditor.EditorWindow + { +#if !UNITY_5_3_OR_NEWER + public GUIContent titleContent; +#endif + + public string key = string.Empty; + public string Value = string.Empty; + public Vector2 scrollPos = Vector2.zero; + + void OnGUI() + { + // The actual window code goes here + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1"))) + EditorGUILayout.LabelField(string.Format("Editing: {0}", key), PlayFabEditorHelper.uiStyle.GetStyle("orTitle"), GUILayout.MinWidth(EditorGUIUtility.currentViewWidth)); + + scrollPos = GUILayout.BeginScrollView(scrollPos, PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1")); + Value = EditorGUILayout.TextArea(Value, PlayFabEditorHelper.uiStyle.GetStyle("editTxt")); + GUILayout.EndScrollView(); + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + GUILayout.FlexibleSpace(); + if (GUILayout.Button("SAVE", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MaxWidth(200))) + { + for (int z = 0; z < PlayFabEditorDataMenu.tdViewer.items.Count; z++) + { + if (PlayFabEditorDataMenu.tdViewer.items[z].Key == key) + { + PlayFabEditorDataMenu.tdViewer.items[z].Value = Value; + PlayFabEditorDataMenu.tdViewer.items[z].isDirty = true; + } + } + Close(); + + } + GUILayout.FlexibleSpace(); + } + + Repaint(); + } + + public void LoadData(string k, string v) + { + key = k; + Value = v; + } + } +} diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleDataEditor.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleDataEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..1187348edf4ec82795e732b9f708e85a113a9999 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleDataEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b7d03dc6e98274816902873adb8ee342 +timeCreated: 1471216768 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleDataViewer.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleDataViewer.cs new file mode 100644 index 0000000000000000000000000000000000000000..37587394fd8876b87b3471fc3e584c6deb00321c --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleDataViewer.cs @@ -0,0 +1,156 @@ +using PlayFab.PfEditor.EditorModels; +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +namespace PlayFab.PfEditor +{ + // TODO: Clean up the copy paste between this and TitleInternalDataViewer + public class TitleDataViewer : UnityEditor.Editor + { + public readonly List items = new List(); + public static TitleDataEditor tdEditor; + public Vector2 scrollPos = Vector2.zero; + private bool showSave = false; + + // this gets called after the Base draw loop + public void Draw() + { + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1"))) + EditorGUILayout.LabelField("TitleData provides Key-Value storage available to all API sets. TitleData is designed to store game-wide configuration data.", PlayFabEditorHelper.uiStyle.GetStyle("genTxt")); + + using (new UnityHorizontal()) + { + GUILayout.FlexibleSpace(); + if (GUILayout.Button("REFRESH", PlayFabEditorHelper.uiStyle.GetStyle("Button"))) + { + RefreshTitleData(); + } + + if (GUILayout.Button("+", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MaxWidth(25))) + { + AddRecord(); + } + } + + if (items != null && items.Count > 0) + { + scrollPos = GUILayout.BeginScrollView(scrollPos, PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1")); + var keyInputBoxWidth = EditorGUIUtility.currentViewWidth > 200 ? 170 : (EditorGUIUtility.currentViewWidth - 100) / 2; + var valueInputBoxWidth = EditorGUIUtility.currentViewWidth > 200 ? EditorGUIUtility.currentViewWidth - 290 : (EditorGUIUtility.currentViewWidth - 100) / 2; + + for (var z = 0; z < items.Count; z++) + { + items[z].DataEditedCheck(); + if (items[z].isDirty) + { + showSave = true; + } + + if (items[z].Value != null) + { + var keyStyle = items[z].isDirty ? PlayFabEditorHelper.uiStyle.GetStyle("listKey_dirty") : PlayFabEditorHelper.uiStyle.GetStyle("listKey"); + var valStyle = items[z].isDirty ? PlayFabEditorHelper.uiStyle.GetStyle("listValue_dirty") : PlayFabEditorHelper.uiStyle.GetStyle("listValue"); + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + items[z].Key = EditorGUILayout.TextField(items[z].Key, keyStyle, GUILayout.Width(keyInputBoxWidth)); + + EditorGUILayout.LabelField(":", GUILayout.MaxWidth(10)); + EditorGUILayout.LabelField("" + items[z].Value, valStyle, GUILayout.MaxWidth(valueInputBoxWidth), GUILayout.MaxHeight(25)); + + if (GUILayout.Button("EDIT", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MaxHeight(19), GUILayout.MinWidth(35))) + { + if (tdEditor == null) + { + tdEditor = EditorWindow.GetWindow(); + tdEditor.titleContent = new GUIContent("Title Data"); + tdEditor.minSize = new Vector2(300, 400); + } + + tdEditor.LoadData(items[z].Key, items[z].Value); + tdEditor.Show(); + } + if (GUILayout.Button("X", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MaxHeight(19), GUILayout.MinWidth(20))) + { + items[z].isDirty = true; + items[z].Value = null; + } + } + } + } + + GUILayout.EndScrollView(); + + if (showSave) + { + using (new UnityHorizontal()) + { + GUILayout.FlexibleSpace(); + if (GUILayout.Button("SAVE", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MaxWidth(200))) + { + SaveRecords(); + } + GUILayout.FlexibleSpace(); + } + } + } + } + + private void AddRecord() + { + items.Add(new KvpItem("", "NewValue") { isDirty = true }); + } + + public void RefreshTitleData() + { + Action dataRequest = (result) => + { + items.Clear(); + showSave = false; + foreach (var kvp in result.Data) + items.Add(new KvpItem(kvp.Key, kvp.Value)); + + PlayFabEditorPrefsSO.Instance.TitleDataCache.Clear(); + foreach (var pair in result.Data) + PlayFabEditorPrefsSO.Instance.TitleDataCache.Add(pair.Key, pair.Value); + PlayFabEditorDataService.SaveEnvDetails(); + }; + + PlayFabEditorApi.GetTitleData(dataRequest, PlayFabEditorHelper.SharedErrorCallback); + } + + private void SaveRecords() + { + //reset dirty status. + showSave = false; + Dictionary dirtyItems = new Dictionary(); + foreach (var item in items) + if (item.isDirty) + dirtyItems.Add(item.Key, item.Value); + + if (dirtyItems.Count > 0) + { + var nextSeconds = 1f; + foreach (var di in dirtyItems) + { + EditorCoroutine.Start(SaveItem(di, nextSeconds)); + nextSeconds += 1f; + } + + foreach (var item in items) + item.CleanItem(); + } + } + + private IEnumerator SaveItem(KeyValuePair dirtyItem, float seconds) + { + yield return new EditorCoroutine.EditorWaitForSeconds(seconds); + //Debug.LogFormat("{0} - Co-Start: {1}", dirtyItem.Key, seconds); + var itemToUpdateDic = new Dictionary { { dirtyItem.Key, dirtyItem.Value } }; + PlayFabEditorApi.SetTitleData(itemToUpdateDic, null, PlayFabEditorHelper.SharedErrorCallback); + } + } +} diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleDataViewer.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleDataViewer.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..ad7e0dc91e68fad4925f2b6ea5c38c8763c8334d --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleDataViewer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 667b18201be5e4597bd623f2314cf2bd +timeCreated: 1468948626 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleInternalDataEditor.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleInternalDataEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..b0a090bb5e527db9f2c30fc26262a11c95fa8fbf --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleInternalDataEditor.cs @@ -0,0 +1,55 @@ +using UnityEditor; +using UnityEngine; + +namespace PlayFab.PfEditor +{ + public class TitleInternalDataEditor : UnityEditor.EditorWindow + { + public string key = string.Empty; + public string Value = string.Empty; +#if !UNITY_5_3_OR_NEWER + public GUIContent titleContent; +#endif + + public Vector2 scrollPos = Vector2.zero; + + void OnGUI() + { + // The actual window code goes here + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1"))) + EditorGUILayout.LabelField(string.Format("Editing: {0}", key), PlayFabEditorHelper.uiStyle.GetStyle("orTitle"), GUILayout.MinWidth(EditorGUIUtility.currentViewWidth)); + + scrollPos = GUILayout.BeginScrollView(scrollPos, PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1")); + Value = EditorGUILayout.TextArea(Value, PlayFabEditorHelper.uiStyle.GetStyle("editTxt")); + GUILayout.EndScrollView(); + + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + GUILayout.FlexibleSpace(); + if (GUILayout.Button("Save", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MaxWidth(200))) + { + for (int z = 0; z < PlayFabEditorDataMenu.tdInternalViewer.items.Count; z++) + { + if (PlayFabEditorDataMenu.tdInternalViewer.items[z].Key == key) + { + PlayFabEditorDataMenu.tdInternalViewer.items[z].Value = Value; + PlayFabEditorDataMenu.tdInternalViewer.items[z].isDirty = true; + } + } + Close(); + + } + GUILayout.FlexibleSpace(); + } + + Repaint(); + } + + public void LoadData(string k, string v) + { + key = k; + Value = v; + } + } +} diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleInternalDataEditor.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleInternalDataEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..fbf55cfe65cee166859b28d65b20b2b50bca467a --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleInternalDataEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: df195403c2c124d3992a79d9622ce809 +timeCreated: 1471216768 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleInternalDataViewer.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleInternalDataViewer.cs new file mode 100644 index 0000000000000000000000000000000000000000..833535e053270c694ca2e143c8cee59b1970524a --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleInternalDataViewer.cs @@ -0,0 +1,147 @@ +using PlayFab.PfEditor.EditorModels; +using System; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +namespace PlayFab.PfEditor +{ + // TODO: Clean up the copy paste between this and TitleDataViewer + public class TitleInternalDataViewer : UnityEditor.Editor + { + public readonly List items = new List(); + public static TitleInternalDataEditor tdEditor; + public Vector2 scrollPos = Vector2.zero; + private bool showSave = false; + + // this gets called after the Base draw loop + public void Draw() + { + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1"))) + EditorGUILayout.LabelField("Internal TitleData provides Key-Value storage available only to Admin & Server API sets. This is useful for storing configuration data that should be hidden from players.", PlayFabEditorHelper.uiStyle.GetStyle("genTxt")); + + using (new UnityHorizontal()) + { + GUILayout.FlexibleSpace(); + if (GUILayout.Button("REFRESH", PlayFabEditorHelper.uiStyle.GetStyle("Button"))) + { + RefreshInternalTitleData(); + } + + if (GUILayout.Button("+", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MaxWidth(25))) + { + AddRecord(); + } + } + + if (items.Count > 0) + { + scrollPos = GUILayout.BeginScrollView(scrollPos, PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1")); + var keyInputBoxWidth = EditorGUIUtility.currentViewWidth > 200 ? 170 : (EditorGUIUtility.currentViewWidth - 100) / 2; + var valueInputBoxWidth = EditorGUIUtility.currentViewWidth > 200 ? EditorGUIUtility.currentViewWidth - 290 : (EditorGUIUtility.currentViewWidth - 100) / 2; + + for (var z = 0; z < items.Count; z++) + { + items[z].DataEditedCheck(); + if (items[z].isDirty) + { + showSave = true; + } + + if (items[z].Value != null) + { + var keyStyle = items[z].isDirty ? PlayFabEditorHelper.uiStyle.GetStyle("listKey_dirty") : PlayFabEditorHelper.uiStyle.GetStyle("listKey"); + var valStyle = items[z].isDirty ? PlayFabEditorHelper.uiStyle.GetStyle("listValue_dirty") : PlayFabEditorHelper.uiStyle.GetStyle("listValue"); + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + items[z].Key = EditorGUILayout.TextField(items[z].Key, keyStyle, GUILayout.Width(keyInputBoxWidth)); + + EditorGUILayout.LabelField(":", GUILayout.MaxWidth(10)); + EditorGUILayout.LabelField("" + items[z].Value, valStyle, GUILayout.MaxWidth(valueInputBoxWidth), GUILayout.MaxHeight(25)); + + if (GUILayout.Button("EDIT", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MaxHeight(19), GUILayout.MinWidth(35))) + { + if (tdEditor == null) + { + tdEditor = EditorWindow.GetWindow(); + tdEditor.titleContent = new GUIContent("Internal Title Data"); + tdEditor.minSize = new Vector2(300, 400); + } + + tdEditor.LoadData(items[z].Key, items[z].Value); + tdEditor.Show(); + } + if (GUILayout.Button("X", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MaxHeight(19), GUILayout.MinWidth(20))) + { + items[z].isDirty = true; + items[z].Value = null; + } + } + } + } + + GUILayout.EndScrollView(); + + if (showSave) + { + using (new UnityHorizontal()) + { + GUILayout.FlexibleSpace(); + if (GUILayout.Button("SAVE", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MaxWidth(200))) + { + SaveRecords(); + } + GUILayout.FlexibleSpace(); + } + } + } + } + + public void AddRecord() + { + items.Add(new KvpItem("", "NewValue") { isDirty = true }); + } + + public void RefreshInternalTitleData() + { + Action cb = (result) => + { + items.Clear(); + showSave = false; + foreach (var kvp in result.Data) + { + items.Add(new KvpItem(kvp.Key, kvp.Value)); + } + + PlayFabEditorPrefsSO.Instance.InternalTitleDataCache.Clear(); + foreach (var pair in result.Data) + PlayFabEditorPrefsSO.Instance.InternalTitleDataCache.Add(pair.Key, pair.Value); + PlayFabEditorDataService.SaveEnvDetails(); + }; + + PlayFabEditorApi.GetTitleInternalData(cb, PlayFabEditorHelper.SharedErrorCallback); + } + + public void SaveRecords() + { + //reset dirty status. + showSave = false; + Dictionary dirtyItems = new Dictionary(); + foreach (var item in items) + if (item.isDirty) + dirtyItems.Add(item.Key, item.Value); + + if (dirtyItems.Count > 0) + { + PlayFabEditorApi.SetTitleInternalData(dirtyItems, (result) => + { + foreach (var item in items) + { + item.CleanItem(); + } + }, PlayFabEditorHelper.SharedErrorCallback); + } + } + } +} diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleInternalDataViewer.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleInternalDataViewer.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..694ba7b6c2e2e9938465c775232ecd3df81cfb88 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Components/TitleInternalDataViewer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 63d2e11a466c94865aac7fbd7aafd302 +timeCreated: 1473957357 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels.meta index e1d1b0ccb42ab9030c607ca095a593a672dd0b0a..26c9cd0e8380c25727224d58513bb1dcd998e617 100644 --- a/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels.meta +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels.meta @@ -1,3 +1,9 @@ -fileFormatVersion: 2 -guid: 4c3acb1fd1414c469ec8386c90b0ef2a -timeCreated: 1628803755 \ No newline at end of file +fileFormatVersion: 2 +guid: a1c77c7ceb0334bb19f90b5abac164b4 +folderAsset: yes +timeCreated: 1471296116 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorAuthenticate.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorAuthenticate.cs new file mode 100644 index 0000000000000000000000000000000000000000..37b9c2c7cb167960386f5e8015ebe96a3b32706f --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorAuthenticate.cs @@ -0,0 +1,326 @@ +using PlayFab.PfEditor.EditorModels; +using UnityEditor; +using UnityEngine; + +namespace PlayFab.PfEditor +{ + public class PlayFabEditorAuthenticate : UnityEditor.Editor + { + #region panel variables + private static string _userEmail = string.Empty; + private static string _userPass = string.Empty; + private static string _userPass2 = string.Empty; + private static string _2FaCode = string.Empty; + private static string _studio = string.Empty; + + private static bool isInitialized = false; + + public enum PanelDisplayStates { Register, Login, TwoFactorPrompt } + private static PanelDisplayStates activeState = PanelDisplayStates.Login; + #endregion + + #region draw calls + public static void DrawAuthPanels() + { + //capture enter input for login + var e = Event.current; + if (e.type == EventType.KeyUp && e.keyCode == KeyCode.Return) + { + switch (activeState) + { + case PanelDisplayStates.Login: + OnLoginButtonClicked(); + break; + case PanelDisplayStates.Register: + OnRegisterClicked(); + break; + case PanelDisplayStates.TwoFactorPrompt: + OnContinueButtonClicked(); + break; + } + } + + if (PlayFabEditorHelper.uiStyle == null) + return; + + if (activeState == PanelDisplayStates.TwoFactorPrompt) + { + using (new UnityVertical(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1"))) + { + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + EditorGUILayout.LabelField("Enter your 2-factor authorization code.", PlayFabEditorHelper.uiStyle.GetStyle("cGenTxt"), GUILayout.MinWidth(EditorGUIUtility.currentViewWidth)); + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1"))) + { + GUILayout.FlexibleSpace(); + _2FaCode = EditorGUILayout.TextField(_2FaCode, PlayFabEditorHelper.uiStyle.GetStyle("TextField"), GUILayout.MinHeight(25), GUILayout.MinWidth(200)); + GUILayout.FlexibleSpace(); + } + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("labelStyle"))) + { + var buttonWidth = 100; + GUILayout.FlexibleSpace(); + if (GUILayout.Button("CONTINUE", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MinHeight(32), GUILayout.MaxWidth(buttonWidth))) + { + OnContinueButtonClicked(); + _2FaCode = string.Empty; + + } + GUILayout.FlexibleSpace(); + } + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("labelStyle"))) + { + GUILayout.FlexibleSpace(); + if (GUILayout.Button("CANCEL", PlayFabEditorHelper.uiStyle.GetStyle("textButton"))) + { + activeState = PanelDisplayStates.Login; + } + GUILayout.FlexibleSpace(); + } + } + return; + } + + if (!string.IsNullOrEmpty(PlayFabEditorPrefsSO.Instance.DevAccountEmail) && !isInitialized) + { + _userEmail = PlayFabEditorPrefsSO.Instance.DevAccountEmail; + PlayFabEditorPrefsSO.Save(); + isInitialized = true; + } + else if (!isInitialized) + { + activeState = PanelDisplayStates.Register; + isInitialized = true; + } + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1"))) + EditorGUILayout.LabelField("Welcome to PlayFab!", PlayFabEditorHelper.uiStyle.GetStyle("titleLabel"), GUILayout.MinWidth(EditorGUIUtility.currentViewWidth)); + + if (activeState == PanelDisplayStates.Login) + { + // login mode, this state either logged out, or did not have auto-login checked. + DrawLogin(); + + } + else if (activeState == PanelDisplayStates.Register) + { + // register mode + DrawRegister(); + } + else + { + DrawRegister(); + } + + using (new UnityVertical(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1"))) + { + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + GUILayout.FlexibleSpace(); + if (GUILayout.Button("VIEW README", PlayFabEditorHelper.uiStyle.GetStyle("textButton"))) + { + Application.OpenURL("https://github.com/PlayFab/UnityEditorExtensions#setup"); + } + GUILayout.FlexibleSpace(); + } + } + } + + private static void DrawLogin() + { + float labelWidth = 120; + + using (new UnityVertical(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1"))) + { + using (var fwl = new FixedWidthLabel("EMAIL: ")) + { + GUILayout.Space(labelWidth - fwl.fieldWidth); + _userEmail = EditorGUILayout.TextField(_userEmail, PlayFabEditorHelper.uiStyle.GetStyle("TextField"), GUILayout.MinHeight(25)); + } + + using (var fwl = new FixedWidthLabel("PASSWORD: ")) + { + GUILayout.Space(labelWidth - fwl.fieldWidth); + _userPass = EditorGUILayout.PasswordField(_userPass, PlayFabEditorHelper.uiStyle.GetStyle("TextField"), GUILayout.MinHeight(25)); + } + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("labelStyle"))) + { + if (GUILayout.Button("CREATE AN ACCOUNT", PlayFabEditorHelper.uiStyle.GetStyle("textButton"), GUILayout.MaxWidth(100))) + { + activeState = PanelDisplayStates.Register; + } + + var buttonWidth = 100; + GUILayout.Space(EditorGUIUtility.currentViewWidth - buttonWidth * 2); + + if (GUILayout.Button("LOG IN", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MinHeight(32), GUILayout.MaxWidth(buttonWidth))) + { + OnLoginButtonClicked(); + } + } + } + } + + private static void DrawRegister() + { + float labelWidth = 150; + + using (new UnityVertical(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1"))) + { + using (var fwl = new FixedWidthLabel("EMAIL:")) + { + GUILayout.Space(labelWidth - fwl.fieldWidth); + _userEmail = EditorGUILayout.TextField(_userEmail, PlayFabEditorHelper.uiStyle.GetStyle("TextField"), GUILayout.MinHeight(25)); + } + + using (var fwl = new FixedWidthLabel("PASSWORD:")) + { + GUILayout.Space(labelWidth - fwl.fieldWidth); + _userPass = EditorGUILayout.PasswordField(_userPass, PlayFabEditorHelper.uiStyle.GetStyle("TextField"), GUILayout.MinHeight(25)); + } + + using (var fwl = new FixedWidthLabel("CONFIRM PASSWORD: ")) + { + GUILayout.Space(labelWidth - fwl.fieldWidth); + _userPass2 = EditorGUILayout.PasswordField(_userPass2, PlayFabEditorHelper.uiStyle.GetStyle("TextField"), GUILayout.MinHeight(25)); + } + + using (var fwl = new FixedWidthLabel("STUDIO NAME: ")) + { + GUILayout.Space(labelWidth - fwl.fieldWidth); + _studio = EditorGUILayout.TextField(_studio, PlayFabEditorHelper.uiStyle.GetStyle("TextField"), GUILayout.MinHeight(25)); + } + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + if (GUILayout.Button("LOG IN", PlayFabEditorHelper.uiStyle.GetStyle("textButton"), GUILayout.MinHeight(32))) + { + activeState = PanelDisplayStates.Login; + } + + GUILayout.FlexibleSpace(); + + if (GUILayout.Button(" CREATE AN ACCOUNT ", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MinHeight(32))) + { + OnRegisterClicked(); + } + } + + } + } + #endregion + + #region menu and helper methods + public static bool IsAuthenticated() + { + return !string.IsNullOrEmpty(PlayFabEditorPrefsSO.Instance.DevAccountToken); + } + + public static void Logout() + { + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnLogout); + + PlayFabEditorApi.Logout(new LogoutRequest + { + DeveloperClientToken = PlayFabEditorPrefsSO.Instance.DevAccountToken + }, null, PlayFabEditorHelper.SharedErrorCallback); + + _userPass = string.Empty; + _userPass2 = string.Empty; + + activeState = PanelDisplayStates.Login; + + PlayFabEditorPrefsSO.Instance.StudioList = null; + PlayFabEditorPrefsSO.Instance.DevAccountToken = string.Empty; + PlayFabEditorPrefsSO.Save(); + + PlayFabEditorPrefsSO.Instance.TitleDataCache.Clear(); + PlayFabEditorDataService.SaveEnvDetails(); + } + + private static void OnRegisterClicked() + { + if (_userPass != _userPass2) + { + Debug.LogError("PlayFab developer account passwords must match."); + return; + } + + PlayFabEditorApi.RegisterAccount(new RegisterAccountRequest() + { + DeveloperToolProductName = PlayFabEditorHelper.EDEX_NAME, + DeveloperToolProductVersion = PlayFabEditorHelper.EDEX_VERSION, + Email = _userEmail, + Password = _userPass, + StudioName = _studio + }, (result) => + { + PlayFabEditorPrefsSO.Instance.DevAccountToken = result.DeveloperClientToken; + PlayFabEditorPrefsSO.Instance.DevAccountEmail = _userEmail; + + PlayFabEditorDataService.RefreshStudiosList(); + + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnLogin); + PlayFabEditorMenu._menuState = PlayFabEditorMenu.MenuStates.Sdks; + PlayFabEditorPrefsSO.Save(); + }, PlayFabEditorHelper.SharedErrorCallback); + } + + private static void OnLoginButtonClicked() + { + PlayFabEditorApi.Login(new LoginRequest() + { + DeveloperToolProductName = PlayFabEditorHelper.EDEX_NAME, + DeveloperToolProductVersion = PlayFabEditorHelper.EDEX_VERSION, + Email = _userEmail, + Password = _userPass + }, (result) => + { + PlayFabEditorPrefsSO.Instance.DevAccountToken = result.DeveloperClientToken; + PlayFabEditorPrefsSO.Instance.DevAccountEmail = _userEmail; + PlayFabEditorDataService.RefreshStudiosList(); + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnLogin); + PlayFabEditorPrefsSO.Save(); + PlayFabEditorMenu._menuState = PlayFabEditorMenu.MenuStates.Sdks; + + }, (error) => + { + if ((int)error.Error == 1246 || error.ErrorMessage.Contains("TwoFactor")) + { + // pop 2FA dialog + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnWarning, "This account requires 2-Factor Authentication."); + activeState = PanelDisplayStates.TwoFactorPrompt; + } + else + { + PlayFabEditorHelper.SharedErrorCallback(error); + } + }); + } + + private static void OnContinueButtonClicked() + { + PlayFabEditorApi.Login(new LoginRequest() + { + DeveloperToolProductName = PlayFabEditorHelper.EDEX_NAME, + DeveloperToolProductVersion = PlayFabEditorHelper.EDEX_VERSION, + TwoFactorAuth = _2FaCode, + Email = _userEmail, + Password = _userPass + }, (result) => + { + PlayFabEditorPrefsSO.Instance.DevAccountToken = result.DeveloperClientToken; + PlayFabEditorPrefsSO.Instance.DevAccountEmail = _userEmail; + PlayFabEditorDataService.RefreshStudiosList(); + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnLogin); + PlayFabEditorPrefsSO.Save(); + PlayFabEditorMenu._menuState = PlayFabEditorMenu.MenuStates.Sdks; + + }, PlayFabEditorHelper.SharedErrorCallback); + } + #endregion + } +} diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorAuthenticate.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorAuthenticate.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..212ac76220b6aa9f699b2edff8c0535ea9b9fb46 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorAuthenticate.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5391580e006220946a84ab25acd7096e +timeCreated: 1465867542 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorDataMenu.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorDataMenu.cs new file mode 100644 index 0000000000000000000000000000000000000000..ad4993810ae91154147a6309675a11c83d42d6cb --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorDataMenu.cs @@ -0,0 +1,123 @@ +using UnityEditor; +using UnityEngine; + +namespace PlayFab.PfEditor +{ + [InitializeOnLoad] + public class PlayFabEditorDataMenu : UnityEditor.Editor + { + #region panel variables + public static TitleDataViewer tdViewer; + public static TitleInternalDataViewer tdInternalViewer; + + public static SubMenuComponent menu = null; + + public enum DataMenuStates { TitleData, TitleDataInternal } + public static DataMenuStates currentState = DataMenuStates.TitleData; + + private static Vector2 scrollPos = Vector2.zero; + + #endregion + + #region draw calls + public static void DrawDataPanel() + { + if (menu == null) + { + RegisterMenu(); + return; + } + + menu.DrawMenu(); + switch ((DataMenuStates)PlayFabEditorPrefsSO.Instance.curSubMenuIdx) + { + case DataMenuStates.TitleData: + if (tdViewer == null) + { + tdViewer = CreateInstance(); + tdViewer.RefreshTitleData(); + } + scrollPos = GUILayout.BeginScrollView(scrollPos, PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1")); + tdViewer.Draw(); + GUILayout.EndScrollView(); + break; + + case DataMenuStates.TitleDataInternal: + if (tdInternalViewer == null) + { + tdInternalViewer = CreateInstance(); + tdInternalViewer.RefreshInternalTitleData(); + } + scrollPos = GUILayout.BeginScrollView(scrollPos, PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1")); + tdInternalViewer.Draw(); + GUILayout.EndScrollView(); + break; + + default: + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1"))) + { + EditorGUILayout.LabelField("Coming Soon!", PlayFabEditorHelper.uiStyle.GetStyle("titleLabel"), GUILayout.MinWidth(EditorGUIUtility.currentViewWidth)); + } + break; + } + } + #endregion + + #region unity loops + static PlayFabEditorDataMenu() + { + if (!PlayFabEditor.IsEventHandlerRegistered(StateUpdateHandler)) + { + PlayFabEditor.EdExStateUpdate += StateUpdateHandler; + } + + RegisterMenu(); + } + + public void OnDestroy() + { + if (PlayFabEditor.IsEventHandlerRegistered(StateUpdateHandler)) + { + PlayFabEditor.EdExStateUpdate -= StateUpdateHandler; + } + } + #endregion + + #region menu and helper methods + public static void RegisterMenu() + { + if (menu != null) + return; + + menu = CreateInstance(); + menu.RegisterMenuItem("TITLE", OnTitleDataClicked); + menu.RegisterMenuItem("INTERNAL", OnInternalTitleDataClicked); + } + + public static void StateUpdateHandler(PlayFabEditor.EdExStates state, string status, string json) + { + switch (state) + { + case PlayFabEditor.EdExStates.OnMenuItemClicked: + break; + case PlayFabEditor.EdExStates.OnLogout: + if (tdViewer != null) + { + tdViewer.items.Clear(); + } + break; + } + } + + public static void OnTitleDataClicked() + { + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnSubmenuItemClicked, DataMenuStates.TitleData.ToString(), "" + (int)DataMenuStates.TitleData); + } + + public static void OnInternalTitleDataClicked() + { + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnSubmenuItemClicked, DataMenuStates.TitleDataInternal.ToString(), "" + (int)DataMenuStates.TitleDataInternal); + } + } + #endregion +} diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorDataMenu.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorDataMenu.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..8df239454694b570b0a5bb9a3e06067b453993df --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorDataMenu.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 473b8182a10e24fd0aebe832f98f7779 +timeCreated: 1470329258 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorHeader.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorHeader.cs new file mode 100644 index 0000000000000000000000000000000000000000..c7778d6de6a5f9d78cb30c989f46f2326ded5eb8 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorHeader.cs @@ -0,0 +1,69 @@ +using UnityEngine; +using UnityEditor; + +namespace PlayFab.PfEditor +{ + public class PlayFabEditorHeader : UnityEditor.Editor + { + public static void DrawHeader(float progress = 0f) + { + if (PlayFabEditorHelper.uiStyle == null) + return; + + //using Begin Vertical as our container. + using (new UnityHorizontal(GUILayout.Height(52))) + { + //Set the image in the container + if (EditorGUIUtility.currentViewWidth < 375) + { + EditorGUILayout.LabelField("", PlayFabEditorHelper.uiStyle.GetStyle("pfLogo"), GUILayout.MaxHeight(40), GUILayout.Width(186)); + } + else + { + EditorGUILayout.LabelField("", PlayFabEditorHelper.uiStyle.GetStyle("pfLogo"), GUILayout.MaxHeight(50), GUILayout.Width(233)); + } + + float gmAnchor = EditorGUIUtility.currentViewWidth - 30; + + + if (EditorGUIUtility.currentViewWidth > 375) + { + gmAnchor = EditorGUIUtility.currentViewWidth - 140; + GUILayout.BeginArea(new Rect(gmAnchor, 10, 140, 42)); + GUILayout.BeginHorizontal(); + if (GUILayout.Button("GAME MANAGER", PlayFabEditorHelper.uiStyle.GetStyle("textButton"), GUILayout.MaxWidth(105))) + { + OnDashbaordClicked(); + } + } + else + { + GUILayout.BeginArea(new Rect(gmAnchor, 10, EditorGUIUtility.currentViewWidth * .25f, 42)); + GUILayout.BeginHorizontal(); + } + + if (GUILayout.Button("", PlayFabEditorHelper.uiStyle.GetStyle("gmIcon"))) + { + OnDashbaordClicked(); + } + GUILayout.EndHorizontal(); + GUILayout.EndArea(); + + //end the vertical container + } + + ProgressBar.Draw(); + + } + + + private static void OnDashbaordClicked() + { + Help.BrowseURL(PlayFabEditorDataService.ActiveTitle != null ? PlayFabEditorDataService.ActiveTitle.GameManagerUrl : PlayFabEditorHelper.GAMEMANAGER_URL); + } + + } +} + + + diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorHeader.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorHeader.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..f163ed448c6a31180336e6bb325aa6f45da9e5d0 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorHeader.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: cd7bce14a0a4b2a4a827a4ffd4d24849 +timeCreated: 1465798284 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorHelpMenu.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorHelpMenu.cs new file mode 100644 index 0000000000000000000000000000000000000000..ac4c66d37a0f26a8f185edd327098c5df6c6e90f --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorHelpMenu.cs @@ -0,0 +1,100 @@ +using UnityEditor; +using UnityEngine; + +namespace PlayFab.PfEditor +{ + public class PlayFabEditorHelpMenu : UnityEditor.Editor + { + public static float buttonWidth = 200; + public static Vector2 scrollPos = Vector2.zero; + + public static void DrawHelpPanel() + { + scrollPos = GUILayout.BeginScrollView(scrollPos, PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1")); + buttonWidth = EditorGUIUtility.currentViewWidth > 400 ? EditorGUIUtility.currentViewWidth / 2 : 200; + + using (new UnityVertical()) + { + EditorGUILayout.LabelField("LEARN PLAYFAB:", PlayFabEditorHelper.uiStyle.GetStyle("labelStyle")); + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + GUILayout.FlexibleSpace(); + + if (GUILayout.Button("BEGINNERS GUIDE", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MinHeight(32), GUILayout.Width(buttonWidth))) + { + Application.OpenURL("https://api.playfab.com/docs/beginners-guide"); + } + + GUILayout.FlexibleSpace(); + } + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + GUILayout.FlexibleSpace(); + + if (GUILayout.Button("RECIPES", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MinHeight(32), GUILayout.Width(buttonWidth))) + { + Application.OpenURL("https://api.playfab.com/docs/recipe-index"); + } + + GUILayout.FlexibleSpace(); + } + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + GUILayout.FlexibleSpace(); + + if (GUILayout.Button("TUTORIALS", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MinHeight(32), GUILayout.Width(buttonWidth))) + { + Application.OpenURL("https://api.playfab.com/docs/tutorials"); + } + + GUILayout.FlexibleSpace(); + } + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + GUILayout.FlexibleSpace(); + + if (GUILayout.Button("API REFERENCE", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MinHeight(32), GUILayout.Width(buttonWidth))) + { + Application.OpenURL("https://api.playfab.com/documentation"); + } + + GUILayout.FlexibleSpace(); + } + } + + using (new UnityVertical()) + { + EditorGUILayout.LabelField("TROUBLESHOOTING:", PlayFabEditorHelper.uiStyle.GetStyle("labelStyle")); + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + GUILayout.FlexibleSpace(); + + if (GUILayout.Button("ASK QUESTIONS", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MinHeight(32), GUILayout.Width(buttonWidth))) + { + Application.OpenURL("https://community.playfab.com/index.html"); + } + + GUILayout.FlexibleSpace(); + } + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + GUILayout.FlexibleSpace(); + + if (GUILayout.Button("VIEW SERVICE AVAILABILITY", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MinHeight(32), GUILayout.Width(buttonWidth))) + { + Application.OpenURL("http://status.playfab.com/"); + } + + GUILayout.FlexibleSpace(); + } + } + GUILayout.EndScrollView(); + } + } +} diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorHelpMenu.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorHelpMenu.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..98c17477ad03bd217de710120377abe7ff281854 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorHelpMenu.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ef5d79e80acc44a588d53dea61dcfc83 +timeCreated: 1470347876 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorMenu.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorMenu.cs new file mode 100644 index 0000000000000000000000000000000000000000..a7570b10c45d6248f035b7be21fb2b2e00f4c2c3 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorMenu.cs @@ -0,0 +1,132 @@ +using UnityEngine; + +namespace PlayFab.PfEditor +{ + public class PlayFabEditorMenu : UnityEditor.Editor + { + #region panel variables + internal enum MenuStates + { + Sdks = 0, + Settings = 1, + Data = 2, + Help = 3, + Tools = 4, + Packages = 5, + Logout = 6 + } + + internal static MenuStates _menuState = MenuStates.Sdks; + #endregion + + public static void DrawMenu() + { + if (PlayFabEditorSDKTools.IsInstalled && PlayFabEditorSDKTools.isSdkSupported) + _menuState = (MenuStates)PlayFabEditorPrefsSO.Instance.curMainMenuIdx; + + var sdksButtonStyle = PlayFabEditorHelper.uiStyle.GetStyle("textButton"); + var settingsButtonStyle = PlayFabEditorHelper.uiStyle.GetStyle("textButton"); + var dataButtonStyle = PlayFabEditorHelper.uiStyle.GetStyle("textButton"); + var helpButtonStyle = PlayFabEditorHelper.uiStyle.GetStyle("textButton"); + var logoutButtonStyle = PlayFabEditorHelper.uiStyle.GetStyle("textButton"); + var toolsButtonStyle = PlayFabEditorHelper.uiStyle.GetStyle("textButton"); + var packagesButtonStyle = PlayFabEditorHelper.uiStyle.GetStyle("textButton"); + + if (_menuState == MenuStates.Sdks) + sdksButtonStyle = PlayFabEditorHelper.uiStyle.GetStyle("textButton_selected"); + if (_menuState == MenuStates.Settings) + settingsButtonStyle = PlayFabEditorHelper.uiStyle.GetStyle("textButton_selected"); + if (_menuState == MenuStates.Logout) + logoutButtonStyle = PlayFabEditorHelper.uiStyle.GetStyle("textButton_selected"); + if (_menuState == MenuStates.Data) + dataButtonStyle = PlayFabEditorHelper.uiStyle.GetStyle("textButton_selected"); + if (_menuState == MenuStates.Help) + helpButtonStyle = PlayFabEditorHelper.uiStyle.GetStyle("textButton_selected"); + if (_menuState == MenuStates.Packages) + packagesButtonStyle = PlayFabEditorHelper.uiStyle.GetStyle("textButton_selected"); + if (_menuState == MenuStates.Tools) + toolsButtonStyle = PlayFabEditorHelper.uiStyle.GetStyle("textButton_selected"); + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1"), GUILayout.Height(25), GUILayout.ExpandWidth(true))) + { + GUILayout.Space(5); + + if (GUILayout.Button("SDK", sdksButtonStyle, GUILayout.MaxWidth(35))) + { + OnSdKsClicked(); + } + + if (PlayFabEditorSDKTools.IsInstalled && PlayFabEditorSDKTools.isSdkSupported) + { + if (GUILayout.Button("SETTINGS", settingsButtonStyle, GUILayout.MaxWidth(65))) + OnSettingsClicked(); + if (GUILayout.Button("DATA", dataButtonStyle, GUILayout.MaxWidth(45))) + OnDataClicked(); + if (GUILayout.Button("TOOLS", toolsButtonStyle, GUILayout.MaxWidth(45))) + OnToolsClicked(); + if(GUILayout.Button("PACKAGES", packagesButtonStyle, GUILayout.MaxWidth(72))) + OnPackagesClicked(); + } + + if (GUILayout.Button("HELP", helpButtonStyle, GUILayout.MaxWidth(45))) + OnHelpClicked(); + GUILayout.FlexibleSpace(); + + if (GUILayout.Button("LOGOUT", logoutButtonStyle, GUILayout.MaxWidth(55))) + OnLogoutClicked(); + } + } + + public static void OnToolsClicked() + { + _menuState = MenuStates.Tools; + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnMenuItemClicked, MenuStates.Tools.ToString()); + PlayFabEditorPrefsSO.Instance.curMainMenuIdx = (int)_menuState; + } + + public static void OnDataClicked() + { + _menuState = MenuStates.Data; + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnMenuItemClicked, MenuStates.Data.ToString()); + PlayFabEditorPrefsSO.Instance.curMainMenuIdx = (int)_menuState; + } + + public static void OnHelpClicked() + { + _menuState = MenuStates.Help; + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnMenuItemClicked, MenuStates.Help.ToString()); + PlayFabEditorPrefsSO.Instance.curMainMenuIdx = (int)_menuState; + } + + public static void OnSdKsClicked() + { + _menuState = MenuStates.Sdks; + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnMenuItemClicked, MenuStates.Sdks.ToString()); + PlayFabEditorPrefsSO.Instance.curMainMenuIdx = (int)_menuState; + } + + public static void OnSettingsClicked() + { + _menuState = MenuStates.Settings; + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnMenuItemClicked, MenuStates.Settings.ToString()); + PlayFabEditorPrefsSO.Instance.curMainMenuIdx = (int)_menuState; + } + + public static void OnPackagesClicked() + { + _menuState = MenuStates.Packages; + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnMenuItemClicked, MenuStates.Packages.ToString()); + PlayFabEditorPrefsSO.Instance.curMainMenuIdx = (int)_menuState; + } + + public static void OnLogoutClicked() + { + _menuState = MenuStates.Logout; + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnMenuItemClicked, MenuStates.Logout.ToString()); + PlayFabEditorAuthenticate.Logout(); + + _menuState = MenuStates.Sdks; + PlayFabEditorPrefsSO.Instance.curMainMenuIdx = (int)_menuState; + } + } +} diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorMenu.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorMenu.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..d0ad35c8b740237429836177d07c83c4fb6f7aa8 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorMenu.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f299dcbf6b977c446a02dfe5885393bd +timeCreated: 1465798447 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorPackages.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorPackages.cs new file mode 100644 index 0000000000000000000000000000000000000000..f98f606981f72f51070b98f4c61c1704d6139898 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorPackages.cs @@ -0,0 +1,113 @@ +using UnityEditor; +using UnityEngine; +using System; +using System.Reflection; + +namespace PlayFab.PfEditor +{ + public class PlayFabEditorPackages : UnityEditor.Editor + { + private const int buttonWidth = 150; + + public static bool IsPubSubPresent { get { return GetIsPubSubTypePresent(); } } + + public static void DrawPackagesMenu() + { +#if ENABLE_PLAYFABPUBSUB_API + var labelStyle = new GUIStyle(PlayFabEditorHelper.uiStyle.GetStyle("label")); + if (Environment.Version.Major < 4) + { + EditorGUILayout.LabelField(" PersistentSockets is only supported with dot Net 4\n\n Please change your Project build settings", labelStyle, GUILayout.MinWidth(EditorGUIUtility.currentViewWidth)); + } + else if (!IsPubSubPresent) + { + DrawPubSubPrivatePreviewWarning(); + GUILayout.BeginHorizontal(); + GUILayout.Label(" PubSub: "); + if (GUILayout.Button("Install From GitHub", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MaxWidth(buttonWidth), GUILayout.MinHeight(32))) + { + string possibleNewtonsoftPath = ""; + if (GetIsNewtonsoftInstalled(out possibleNewtonsoftPath)) + { + EditorUtility.DisplayDialog("Newtonsoft is already installed.", + "Please delete your version of Netwonsoft.json.dll in \n\n" + possibleNewtonsoftPath + " \n and retry the install.\n\n Compiler conflicts will occur if this package is installed and Newtonsoft already exists.", "Continue", "Cancel"); + } + else + { + ImportPubSubSDK(); + } + } + + GUILayout.EndHorizontal(); + } + else + { + EditorGUILayout.LabelField(" PersistentSockets is Installed", labelStyle, GUILayout.MinWidth(EditorGUIUtility.currentViewWidth)); + } +#endif + } + + private static void DrawPubSubPrivatePreviewWarning() + { + GUILayout.BeginHorizontal(); + GUILayout.Label(" PUBSUB IS IN PRIVATE PREVIEW."); + GUILayout.EndHorizontal(); + GUILayout.BeginHorizontal(); + GUILayout.Label(" If you are a Professional or Enterprise tier customer and wish to try this feature out, Please contact devrel@playfab.com for more information."); + GUILayout.EndHorizontal(); + GUILayout.BeginHorizontal(); + GUILayout.Label(" User MUST be currently signed into GitHub (with their default browser) to successfully install the unitypackage"); + GUILayout.EndHorizontal(); + } + + public static void ImportPubSubSDK() + { + var link = "https://api.playfab.com/downloads/unity-signalr"; + System.Diagnostics.Process.Start(link); + } + + public static bool GetIsNewtonsoftInstalled(out string path) + { + var allAssemblies = AppDomain.CurrentDomain.GetAssemblies(); + foreach (var assembly in allAssemblies) + { + if (assembly.FullName.Contains("Newtonsoft.Json")) + { + path = assembly.Location; + return true; + } + + foreach (var eachType in assembly.GetTypes()) + { + if (eachType.Name.Contains("Newtonsoft")) + { + path = assembly.Location; + return true; + } + } + } + path = "N/A"; + return false; + } + + // TODO: move this function to a shared location + // and CACHE the results so we don't need to loop multiple times. + public static bool GetIsPubSubTypePresent() + { + var allAssemblies = AppDomain.CurrentDomain.GetAssemblies(); + + foreach (var assembly in allAssemblies) + { + foreach (var eachType in assembly.GetTypes()) + { + if (eachType.Name.Contains("PubSub")) + { + return true; + } + } + } + + return false; + } + } +} diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorPackages.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorPackages.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..cf6fa81c3f76d41192decf126e678919125419aa --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorPackages.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d82ae6e4704d39945b28d49f4f084d9d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorSDKTools.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorSDKTools.cs new file mode 100644 index 0000000000000000000000000000000000000000..81899f8ca1310141972277dacf73f59b78b05679 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorSDKTools.cs @@ -0,0 +1,410 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using UnityEditor; +using UnityEngine; + +namespace PlayFab.PfEditor +{ + public class PlayFabEditorSDKTools : UnityEditor.Editor + { + private const int buttonWidth = 150; + public static bool IsInstalled { get { return GetPlayFabSettings() != null; } } + + private static Type playFabSettingsType = null; + private static string installedSdkVersion = string.Empty; + private static string latestSdkVersion = string.Empty; + private static UnityEngine.Object sdkFolder; + private static UnityEngine.Object _previousSdkFolderPath; + private static bool isObjectFieldActive; + private static bool isInitialized; //used to check once, gets reset after each compile; + public static bool isSdkSupported = true; + + public static void DrawSdkPanel() + { + if (!isInitialized) + { + //SDK is installed. + CheckSdkVersion(); + isInitialized = true; + GetLatestSdkVersion(); + sdkFolder = FindSdkAsset(); + + if (sdkFolder != null) + { + PlayFabEditorPrefsSO.Instance.SdkPath = AssetDatabase.GetAssetPath(sdkFolder); + PlayFabEditorDataService.SaveEnvDetails(); + } + } + + if (IsInstalled) + ShowSdkInstalledMenu(); + else + ShowSdkNotInstalledMenu(); + } + + private static void ShowSdkInstalledMenu() + { + isObjectFieldActive = sdkFolder == null; + + if (_previousSdkFolderPath != sdkFolder) + { + // something changed, better save the result. + _previousSdkFolderPath = sdkFolder; + + PlayFabEditorPrefsSO.Instance.SdkPath = (AssetDatabase.GetAssetPath(sdkFolder)); + PlayFabEditorDataService.SaveEnvDetails(); + + isObjectFieldActive = false; + } + + var labelStyle = new GUIStyle(PlayFabEditorHelper.uiStyle.GetStyle("titleLabel")); + using (new UnityVertical(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1"))) + { + EditorGUILayout.LabelField(string.Format("SDK {0} is installed", string.IsNullOrEmpty(installedSdkVersion) ? "Unknown" : installedSdkVersion), + labelStyle, GUILayout.MinWidth(EditorGUIUtility.currentViewWidth)); + + if (!isObjectFieldActive) + { + GUI.enabled = false; + } + else + { + EditorGUILayout.LabelField( + "An SDK was detected, but we were unable to find the directory. Drag-and-drop the top-level PlayFab SDK folder below.", + PlayFabEditorHelper.uiStyle.GetStyle("orTxt")); + } + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + GUILayout.FlexibleSpace(); + sdkFolder = EditorGUILayout.ObjectField(sdkFolder, typeof(UnityEngine.Object), false, GUILayout.MaxWidth(200)); + GUILayout.FlexibleSpace(); + } + + if (!isObjectFieldActive) + { + // this is a hack to prevent our "block while loading technique" from breaking up at this point. + GUI.enabled = !EditorApplication.isCompiling && PlayFabEditor.blockingRequests.Count == 0; + } + + if (isSdkSupported && sdkFolder != null) + { + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + + GUILayout.FlexibleSpace(); + + if (GUILayout.Button("REMOVE SDK", PlayFabEditorHelper.uiStyle.GetStyle("textButton"), GUILayout.MinHeight(32), GUILayout.MinWidth(200))) + { + RemoveSdk(); + } + + GUILayout.FlexibleSpace(); + } + } + + } + + if (sdkFolder != null) + { + using (new UnityVertical(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1"))) + { + isSdkSupported = false; + string[] versionNumber = !string.IsNullOrEmpty(installedSdkVersion) ? installedSdkVersion.Split('.') : new string[0]; + + var numerical = 0; + if (string.IsNullOrEmpty(installedSdkVersion) || versionNumber == null || versionNumber.Length == 0 || + (versionNumber.Length > 0 && int.TryParse(versionNumber[0], out numerical) && numerical < 2)) + { + //older version of the SDK + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + EditorGUILayout.LabelField("Most of the Editor Extensions depend on SDK versions >2.0. Consider upgrading to the get most features.", PlayFabEditorHelper.uiStyle.GetStyle("orTxt")); + } + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + GUILayout.FlexibleSpace(); + if (GUILayout.Button("READ THE UPGRADE GUIDE", PlayFabEditorHelper.uiStyle.GetStyle("textButton"), GUILayout.MinHeight(32))) + { + Application.OpenURL("https://github.com/PlayFab/UnitySDK/blob/master/UPGRADE.md"); + } + GUILayout.FlexibleSpace(); + } + } + else if (numerical >= 2) + { + isSdkSupported = true; + } + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + if (ShowSDKUpgrade() && isSdkSupported) + { + GUILayout.FlexibleSpace(); + if (GUILayout.Button("Upgrade to " + latestSdkVersion, PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MinHeight(32))) + { + UpgradeSdk(); + } + GUILayout.FlexibleSpace(); + } + else if (isSdkSupported) + { + GUILayout.FlexibleSpace(); + EditorGUILayout.LabelField("You have the latest SDK!", labelStyle, GUILayout.MinHeight(32)); + GUILayout.FlexibleSpace(); + } + } + } + } + + if (isSdkSupported && string.IsNullOrEmpty(PlayFabEditorDataService.SharedSettings.TitleId)) + { + using (new UnityVertical(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1"))) + { + EditorGUILayout.LabelField("Before making PlayFab API calls, the SDK must be configured to your PlayFab Title.", PlayFabEditorHelper.uiStyle.GetStyle("orTxt")); + using (new UnityHorizontal()) + { + GUILayout.FlexibleSpace(); + if (GUILayout.Button("SET MY TITLE", PlayFabEditorHelper.uiStyle.GetStyle("textButton"))) + { + PlayFabEditorMenu.OnSettingsClicked(); + } + GUILayout.FlexibleSpace(); + } + } + } + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1"))) + { + GUILayout.FlexibleSpace(); + + if (GUILayout.Button("VIEW RELEASE NOTES", PlayFabEditorHelper.uiStyle.GetStyle("textButton"), GUILayout.MinHeight(32), GUILayout.MinWidth(200))) + { + Application.OpenURL("https://api.playfab.com/releaseNotes/"); + } + + GUILayout.FlexibleSpace(); + } + } + + private static void ShowSdkNotInstalledMenu() + { + using (new UnityVertical(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1"))) + { + var labelStyle = new GUIStyle(PlayFabEditorHelper.uiStyle.GetStyle("titleLabel")); + + EditorGUILayout.LabelField("No SDK is installed.", labelStyle, GUILayout.MinWidth(EditorGUIUtility.currentViewWidth)); + GUILayout.Space(20); + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1"))) + { + GUILayout.FlexibleSpace(); + if (GUILayout.Button("Refresh", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MaxWidth(buttonWidth), GUILayout.MinHeight(32))) + playFabSettingsType = null; + GUILayout.FlexibleSpace(); + if (GUILayout.Button("Install PlayFab SDK", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MaxWidth(buttonWidth), GUILayout.MinHeight(32))) + ImportLatestSDK(); + + GUILayout.FlexibleSpace(); + } + } + } + + public static void ImportLatestSDK() + { + PlayFabEditorHttp.MakeDownloadCall("https://api.playfab.com/sdks/download/unity-via-edex", (fileName) => + { + Debug.Log("PlayFab SDK Install: Complete"); + AssetDatabase.ImportPackage(fileName, false); + + // attempts to re-import any changed assets (which ImportPackage doesn't implicitly do) + AssetDatabase.Refresh(); + + PlayFabEditorPrefsSO.Instance.SdkPath = PlayFabEditorHelper.DEFAULT_SDK_LOCATION; + PlayFabEditorDataService.SaveEnvDetails(); + + }); + } + + public static Type GetPlayFabSettings() + { + if (playFabSettingsType == typeof(object)) + return null; // Sentinel value to indicate that PlayFabSettings doesn't exist + if (playFabSettingsType != null) + return playFabSettingsType; + + playFabSettingsType = typeof(object); // Sentinel value to indicate that PlayFabSettings doesn't exist + var allAssemblies = AppDomain.CurrentDomain.GetAssemblies(); + foreach (var assembly in allAssemblies) + { + Type[] assemblyTypes; + try + { + assemblyTypes = assembly.GetTypes(); + } + catch (ReflectionTypeLoadException e) + { + assemblyTypes = e.Types; + } + + foreach (var eachType in assemblyTypes) + if (eachType != null) + if (eachType.Name == PlayFabEditorHelper.PLAYFAB_SETTINGS_TYPENAME) + playFabSettingsType = eachType; + } + + //if (playFabSettingsType == typeof(object)) + // Debug.LogWarning("Should not have gotten here: " + allAssemblies.Length); + //else + // Debug.Log("Found Settings: " + allAssemblies.Length + ", " + playFabSettingsType.Assembly.FullName); + return playFabSettingsType == typeof(object) ? null : playFabSettingsType; + } + + private static void CheckSdkVersion() + { + if (!string.IsNullOrEmpty(installedSdkVersion)) + return; + + var types = new List(); + foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) + { + try + { + foreach (var type in assembly.GetTypes()) + if (type.Name == "PlayFabVersion" || type.Name == PlayFabEditorHelper.PLAYFAB_SETTINGS_TYPENAME) + types.Add(type); + } + catch (ReflectionTypeLoadException) + { + // For this failure, silently skip this assembly unless we have some expectation that it contains PlayFab + if (assembly.FullName.StartsWith("Assembly-CSharp")) // The standard "source-code in unity proj" assembly name + Debug.LogWarning("PlayFab EdEx Error, failed to access the main CSharp assembly that probably contains PlayFab. Please report this on the PlayFab Forums"); + continue; + } + } + + foreach (var type in types) + { + foreach (var property in type.GetProperties()) + if (property.Name == "SdkVersion" || property.Name == "SdkRevision") + installedSdkVersion += property.GetValue(property, null).ToString(); + foreach (var field in type.GetFields()) + if (field.Name == "SdkVersion" || field.Name == "SdkRevision") + installedSdkVersion += field.GetValue(field).ToString(); + } + } + + private static UnityEngine.Object FindSdkAsset() + { + UnityEngine.Object sdkAsset = null; + + // look in editor prefs + if (PlayFabEditorPrefsSO.Instance.SdkPath != null) + { + sdkAsset = AssetDatabase.LoadAssetAtPath(PlayFabEditorPrefsSO.Instance.SdkPath, typeof(UnityEngine.Object)); + } + if (sdkAsset != null) + return sdkAsset; + + sdkAsset = AssetDatabase.LoadAssetAtPath(PlayFabEditorHelper.DEFAULT_SDK_LOCATION, typeof(UnityEngine.Object)); + if (sdkAsset != null) + return sdkAsset; + + var fileList = Directory.GetDirectories(Application.dataPath, "*PlayFabSdk", SearchOption.AllDirectories); + if (fileList.Length == 0) + return null; + + var relPath = fileList[0].Substring(fileList[0].LastIndexOf("Assets")); + return AssetDatabase.LoadAssetAtPath(relPath, typeof(UnityEngine.Object)); + } + + private static bool ShowSDKUpgrade() + { + if (string.IsNullOrEmpty(latestSdkVersion) || latestSdkVersion == "Unknown") + { + return false; + } + + if (string.IsNullOrEmpty(installedSdkVersion) || installedSdkVersion == "Unknown") + { + return true; + } + + string[] currrent = installedSdkVersion.Split('.'); + string[] latest = latestSdkVersion.Split('.'); + + if (int.Parse(currrent[0]) < 2) + { + return false; + } + + return int.Parse(latest[0]) > int.Parse(currrent[0]) + || int.Parse(latest[1]) > int.Parse(currrent[1]) + || int.Parse(latest[2]) > int.Parse(currrent[2]); + } + + private static void UpgradeSdk() + { + if (EditorUtility.DisplayDialog("Confirm SDK Upgrade", "This action will remove the current PlayFab SDK and install the lastet version. Related plug-ins will need to be manually upgraded.", "Confirm", "Cancel")) + { + RemoveSdk(false); + ImportLatestSDK(); + } + } + + private static void RemoveSdk(bool prompt = true) + { + if (prompt && !EditorUtility.DisplayDialog("Confirm SDK Removal", "This action will remove the current PlayFab SDK. Related plug-ins will need to be manually removed.", "Confirm", "Cancel")) + return; + + //try to clean-up the plugin dirs + if (Directory.Exists(Application.dataPath + "/Plugins")) + { + var folders = Directory.GetDirectories(Application.dataPath + "/Plugins", "PlayFabShared", SearchOption.AllDirectories); + foreach (var folder in folders) + FileUtil.DeleteFileOrDirectory(folder); + + //try to clean-up the plugin files (if anything is left) + var files = Directory.GetFiles(Application.dataPath + "/Plugins", "PlayFabErrors.cs", SearchOption.AllDirectories); + foreach (var file in files) + FileUtil.DeleteFileOrDirectory(file); + } + + if (FileUtil.DeleteFileOrDirectory(PlayFabEditorPrefsSO.Instance.SdkPath)) + { + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnSuccess, "PlayFab SDK Removed!"); + + // HACK for 5.4, AssetDatabase.Refresh(); seems to cause the install to fail. + if (prompt) + { + AssetDatabase.Refresh(); + } + } + else + { + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnError, "An unknown error occured and the PlayFab SDK could not be removed."); + } + } + + private static void GetLatestSdkVersion() + { + var threshold = PlayFabEditorPrefsSO.Instance.EdSet_lastSdkVersionCheck != DateTime.MinValue ? PlayFabEditorPrefsSO.Instance.EdSet_lastSdkVersionCheck.AddHours(1) : DateTime.MinValue; + + if (DateTime.Today > threshold) + { + PlayFabEditorHttp.MakeGitHubApiCall("https://api.github.com/repos/PlayFab/UnitySDK/git/refs/tags", (version) => + { + latestSdkVersion = version ?? "Unknown"; + PlayFabEditorPrefsSO.Instance.EdSet_latestSdkVersion = latestSdkVersion; + }); + } + else + { + latestSdkVersion = PlayFabEditorPrefsSO.Instance.EdSet_latestSdkVersion; + } + } + } +} diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorSDKTools.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorSDKTools.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..aee8a92715ec421c9d22b597dffe179aaac43821 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorSDKTools.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 808d230e8f7859f4a9c84f6653a2ba1c +timeCreated: 1465798472 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorSettings.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorSettings.cs new file mode 100644 index 0000000000000000000000000000000000000000..5d8c504d30cb83849af18f4b9f47086437c7cce9 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorSettings.cs @@ -0,0 +1,364 @@ +using PlayFab.PfEditor.EditorModels; +using System; +using System.Collections.Generic; +using System.Text; +using UnityEditor; +using UnityEngine; + +namespace PlayFab.PfEditor +{ + [InitializeOnLoad] + public class PlayFabEditorSettings : UnityEditor.Editor + { + #region panel variables + public enum SubMenuStates + { + StandardSettings, + TitleSettings, + ApiSettings, + } + + public enum WebRequestType + { + UnityWww, // High compatability Unity api calls + HttpWebRequest, // High performance multi-threaded api calls +#if UNITY_2017_2_OR_NEWER + UnityWebRequest, // Modern unity HTTP component +#endif + } + + private static float LABEL_WIDTH = 180; + + private static readonly StringBuilder Sb = new StringBuilder(); + + private static SubMenuComponent _menu = null; + + private static readonly Dictionary StudioFoldOutStates = new Dictionary(); + private static Vector2 _titleScrollPos = Vector2.zero; + #endregion + + #region draw calls + private static void DrawApiSubPanel() + { + using (new UnityVertical(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1"))) + { + var curDefines = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup); + var changedFlags = false; + var allFlags = new Dictionary(PlayFabEditorHelper.FLAG_LABELS); + var extraDefines = new HashSet(curDefines.Split(' ', ';')); + foreach (var eachFlag in extraDefines) + if (!string.IsNullOrEmpty(eachFlag) && !allFlags.ContainsKey(eachFlag)) + allFlags.Add(eachFlag, new PfDefineFlag { Flag = eachFlag, Label = eachFlag, Category = PfDefineFlag.FlagCategory.Other, isInverted = false, isSafe = false }); + var allowUnsafe = extraDefines.Contains(PlayFabEditorHelper.ENABLE_BETA_FETURES); + + foreach (PfDefineFlag.FlagCategory activeFlagCategory in Enum.GetValues(typeof(PfDefineFlag.FlagCategory))) + { + if (activeFlagCategory == PfDefineFlag.FlagCategory.Other && !allowUnsafe) + continue; + + using (var fwl = new FixedWidthLabel(activeFlagCategory.ToString())) { } + + foreach (var eachDefinePair in allFlags) + { + PfDefineFlag eachFlag = eachDefinePair.Value; + if (eachFlag.Category == activeFlagCategory && (eachFlag.isSafe || allowUnsafe)) + DisplayDefineToggle(eachFlag.Label + ": ", eachFlag.isInverted, eachFlag.Flag, ref curDefines, ref changedFlags); + } + } + + if (changedFlags) + { + PlayerSettings.SetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup, curDefines); + Debug.Log("Updating Defines: " + curDefines); + AssetDatabase.Refresh(); + } + } + } + + private static void DisplayDefineToggle(string label, bool invertDisplay, string displayedDefine, ref string curDefines, ref bool changedFlag) + { + bool flagSet, flagGet = curDefines.Contains(displayedDefine); + using (var fwl = new FixedWidthLabel(label)) + { + GUILayout.Space(LABEL_WIDTH - fwl.fieldWidth); + flagSet = EditorGUILayout.Toggle(invertDisplay ? !flagGet : flagGet, PlayFabEditorHelper.uiStyle.GetStyle("Toggle"), GUILayout.MinHeight(25)); + if (invertDisplay) + flagSet = !flagSet; + } + changedFlag |= flagSet != flagGet; + + Sb.Length = 0; + if (flagSet && !flagGet) + { + Sb.Append(curDefines); + if (Sb.Length > 0) + Sb.Append(";"); + Sb.Append(displayedDefine); + curDefines = Sb.ToString(); + } + else if (!flagSet && flagGet) + { + Sb.Append(curDefines); + Sb.Replace(displayedDefine, "").Replace(";;", ";"); + if (Sb.Length > 0 && Sb[0] == ';') + Sb.Remove(0, 1); + if (Sb.Length > 0 && Sb[Sb.Length - 1] == ';') + Sb.Remove(Sb.Length - 1, 1); + curDefines = Sb.ToString(); + } + } + + public static void DrawSettingsPanel() + { + if (_menu != null) + { + _menu.DrawMenu(); + switch ((SubMenuStates)PlayFabEditorPrefsSO.Instance.curSubMenuIdx) + { + case SubMenuStates.StandardSettings: + DrawStandardSettingsSubPanel(); + break; + case SubMenuStates.ApiSettings: + DrawApiSubPanel(); + break; + case SubMenuStates.TitleSettings: + DrawTitleSettingsSubPanel(); + break; + } + } + else + { + RegisterMenu(); + } + } + + private static void DrawTitleSettingsSubPanel() + { + float labelWidth = 100; + + if (PlayFabEditorPrefsSO.Instance.StudioList != null && PlayFabEditorPrefsSO.Instance.StudioList.Count != StudioFoldOutStates.Count + 1) + { + StudioFoldOutStates.Clear(); + foreach (var studio in PlayFabEditorPrefsSO.Instance.StudioList) + { + if (string.IsNullOrEmpty(studio.Id)) + continue; + if (!StudioFoldOutStates.ContainsKey(studio.Id)) + StudioFoldOutStates.Add(studio.Id, new StudioDisplaySet { Studio = studio }); + foreach (var title in studio.Titles) + if (!StudioFoldOutStates[studio.Id].titleFoldOutStates.ContainsKey(title.Id)) + StudioFoldOutStates[studio.Id].titleFoldOutStates.Add(title.Id, new TitleDisplaySet { Title = title }); + } + } + + _titleScrollPos = GUILayout.BeginScrollView(_titleScrollPos, PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1")); + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + EditorGUILayout.LabelField("STUDIOS:", PlayFabEditorHelper.uiStyle.GetStyle("labelStyle"), GUILayout.Width(labelWidth)); + GUILayout.FlexibleSpace(); + if (GUILayout.Button("REFRESH", PlayFabEditorHelper.uiStyle.GetStyle("Button"))) + PlayFabEditorDataService.RefreshStudiosList(); + } + + foreach (var studio in StudioFoldOutStates) + { + var style = new GUIStyle(EditorStyles.foldout); + if (studio.Value.isCollapsed) + style.fontStyle = FontStyle.Normal; + + studio.Value.isCollapsed = EditorGUI.Foldout(EditorGUILayout.GetControlRect(), studio.Value.isCollapsed, string.Format("{0} ({1})", studio.Value.Studio.Name, studio.Value.Studio.Titles.Length), true, PlayFabEditorHelper.uiStyle.GetStyle("foldOut_std")); + if (studio.Value.isCollapsed) + continue; + + EditorGUI.indentLevel = 2; + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + EditorGUILayout.LabelField("TITLES:", PlayFabEditorHelper.uiStyle.GetStyle("labelStyle"), GUILayout.Width(labelWidth)); + } + GUILayout.Space(5); + + // draw title foldouts + foreach (var title in studio.Value.titleFoldOutStates) + { + title.Value.isCollapsed = EditorGUI.Foldout(EditorGUILayout.GetControlRect(), title.Value.isCollapsed, string.Format("{0} [{1}]", title.Value.Title.Name, title.Value.Title.Id), true, PlayFabEditorHelper.uiStyle.GetStyle("foldOut_std")); + if (title.Value.isCollapsed) + continue; + + EditorGUI.indentLevel = 3; + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + EditorGUILayout.LabelField("SECRET KEY:", PlayFabEditorHelper.uiStyle.GetStyle("labelStyle"), GUILayout.Width(labelWidth)); + EditorGUILayout.TextField("" + title.Value.Title.SecretKey); + } + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + EditorGUILayout.LabelField("URL:", PlayFabEditorHelper.uiStyle.GetStyle("labelStyle"), GUILayout.Width(labelWidth)); + GUILayout.FlexibleSpace(); + if (GUILayout.Button("VIEW IN GAME MANAGER", PlayFabEditorHelper.uiStyle.GetStyle("textButton"))) + Application.OpenURL(title.Value.Title.GameManagerUrl); + GUILayout.FlexibleSpace(); + } + EditorGUI.indentLevel = 2; + } + + EditorGUI.indentLevel = 0; + } + GUILayout.EndScrollView(); + } + + private static Studio GetStudioForTitleId(string titleId) + { + if (PlayFabEditorPrefsSO.Instance.StudioList == null) + return Studio.OVERRIDE; + foreach (var eachStudio in PlayFabEditorPrefsSO.Instance.StudioList) + if (eachStudio.Titles != null) + foreach (var eachTitle in eachStudio.Titles) + if (eachTitle.Id == titleId) + return eachStudio; + return Studio.OVERRIDE; + } + + private static void DrawStandardSettingsSubPanel() + { + float labelWidth = 160; + + using (new UnityVertical(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1"), GUILayout.ExpandWidth(true))) + { + var studio = GetStudioForTitleId(PlayFabEditorDataService.SharedSettings.TitleId); + if (string.IsNullOrEmpty(studio.Id)) + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + EditorGUILayout.LabelField("You are using a TitleId to which you are not a member. A title administrator can approve access for your account.", PlayFabEditorHelper.uiStyle.GetStyle("orTxt")); + + PlayFabGuiFieldHelper.SuperFancyDropdown(labelWidth, "STUDIO: ", studio, PlayFabEditorPrefsSO.Instance.StudioList, eachStudio => eachStudio.Name, OnStudioChange, PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear")); + studio = GetStudioForTitleId(PlayFabEditorDataService.SharedSettings.TitleId); // This might have changed above, so refresh it + + if (string.IsNullOrEmpty(studio.Id)) + { + // Override studio lets you set your own titleId + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + EditorGUILayout.LabelField("TITLE ID: ", PlayFabEditorHelper.uiStyle.GetStyle("labelStyle"), GUILayout.Width(labelWidth)); + + var newTitleId = EditorGUILayout.TextField(PlayFabEditorDataService.SharedSettings.TitleId, PlayFabEditorHelper.uiStyle.GetStyle("TextField"), GUILayout.MinHeight(25)); + if (newTitleId != PlayFabEditorDataService.SharedSettings.TitleId) + OnTitleIdChange(newTitleId); + } + } + else + { + PlayFabGuiFieldHelper.SuperFancyDropdown(labelWidth, "TITLE ID: ", studio.GetTitle(PlayFabEditorDataService.SharedSettings.TitleId), studio.Titles, GetTitleDisplayString, OnTitleChange, PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear")); + } + + DrawPfSharedSettingsOptions(labelWidth); + } + } + + private static string GetTitleDisplayString(Title title) + { + return string.Format("[{0}] {1}", title.Id, title.Name); + } + + private static void DrawPfSharedSettingsOptions(float labelWidth) + { +#if ENABLE_PLAYFABADMIN_API || ENABLE_PLAYFABSERVER_API || UNITY_EDITOR + // Set the title secret key, if we're using the dropdown + var studio = GetStudioForTitleId(PlayFabEditorDataService.SharedSettings.TitleId); + var correctKey = studio.GetTitleSecretKey(PlayFabEditorDataService.SharedSettings.TitleId); + var setKey = !string.IsNullOrEmpty(studio.Id) && !string.IsNullOrEmpty(correctKey); + if (setKey) + PlayFabEditorDataService.SharedSettings.DeveloperSecretKey = correctKey; + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + EditorGUILayout.LabelField("DEVELOPER SECRET KEY: ", PlayFabEditorHelper.uiStyle.GetStyle("labelStyle"), GUILayout.Width(labelWidth)); + using (new UnityGuiToggler(!setKey)) + PlayFabEditorDataService.SharedSettings.DeveloperSecretKey = EditorGUILayout.TextField(PlayFabEditorDataService.SharedSettings.DeveloperSecretKey, PlayFabEditorHelper.uiStyle.GetStyle("TextField"), GUILayout.MinHeight(25)); + } +#endif + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + EditorGUILayout.LabelField("REQUEST TYPE: ", PlayFabEditorHelper.uiStyle.GetStyle("labelStyle"), GUILayout.MaxWidth(labelWidth)); + PlayFabEditorDataService.SharedSettings.WebRequestType = (WebRequestType)EditorGUILayout.EnumPopup(PlayFabEditorDataService.SharedSettings.WebRequestType, PlayFabEditorHelper.uiStyle.GetStyle("TextField"), GUILayout.Height(25)); + } + + if (PlayFabEditorDataService.SharedSettings.WebRequestType == WebRequestType.HttpWebRequest) + { + using (var fwl = new FixedWidthLabel(new GUIContent("REQUEST TIMEOUT: "), PlayFabEditorHelper.uiStyle.GetStyle("labelStyle"))) + { + GUILayout.Space(labelWidth - fwl.fieldWidth); + PlayFabEditorDataService.SharedSettings.TimeOut = EditorGUILayout.IntField(PlayFabEditorDataService.SharedSettings.TimeOut, PlayFabEditorHelper.uiStyle.GetStyle("TextField"), GUILayout.MinHeight(25)); + } + + using (var fwl = new FixedWidthLabel(new GUIContent("KEEP ALIVE: "), PlayFabEditorHelper.uiStyle.GetStyle("labelStyle"))) + { + GUILayout.Space(labelWidth - fwl.fieldWidth); + PlayFabEditorDataService.SharedSettings.KeepAlive = EditorGUILayout.Toggle(PlayFabEditorDataService.SharedSettings.KeepAlive, PlayFabEditorHelper.uiStyle.GetStyle("Toggle"), GUILayout.MinHeight(25)); + } + } + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + EditorGUILayout.LabelField("COMPRESS API DATA: ", PlayFabEditorHelper.uiStyle.GetStyle("labelStyle"), GUILayout.MaxWidth(labelWidth)); + PlayFabEditorDataService.SharedSettings.CompressApiData = EditorGUILayout.Toggle(PlayFabEditorDataService.SharedSettings.CompressApiData, PlayFabEditorHelper.uiStyle.GetStyle("Toggle"), GUILayout.MinHeight(25)); + } + } + #endregion + + #region menu and helper methods + private static void RegisterMenu() + { + if (_menu != null) + return; + + _menu = CreateInstance(); + _menu.RegisterMenuItem("PROJECT", OnStandardSetttingsClicked); + _menu.RegisterMenuItem("STUDIOS", OnTitleSettingsClicked); + _menu.RegisterMenuItem("API", OnApiSettingsClicked); + } + + private static void OnApiSettingsClicked() + { + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnSubmenuItemClicked, SubMenuStates.ApiSettings.ToString(), "" + (int)SubMenuStates.ApiSettings); + } + + private static void OnStandardSetttingsClicked() + { + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnSubmenuItemClicked, SubMenuStates.StandardSettings.ToString(), "" + (int)SubMenuStates.StandardSettings); + } + + private static void OnTitleSettingsClicked() + { + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnSubmenuItemClicked, SubMenuStates.TitleSettings.ToString(), "" + (int)SubMenuStates.TitleSettings); + } + + private static void OnStudioChange(Studio newStudio) + { + var newTitleId = (newStudio.Titles == null || newStudio.Titles.Length == 0) ? "" : newStudio.Titles[0].Id; + OnTitleIdChange(newTitleId); + } + + private static void OnTitleChange(Title newTitle) + { + OnTitleIdChange(newTitle.Id); + } + + private static void OnTitleIdChange(string newTitleId) + { + var studio = GetStudioForTitleId(newTitleId); + PlayFabEditorPrefsSO.Instance.SelectedStudio = studio.Name; + PlayFabEditorDataService.SharedSettings.TitleId = newTitleId; +#if ENABLE_PLAYFABADMIN_API || ENABLE_PLAYFABSERVER_API || UNITY_EDITOR + PlayFabEditorDataService.SharedSettings.DeveloperSecretKey = studio.GetTitleSecretKey(newTitleId); +#endif + PlayFabEditorPrefsSO.Instance.TitleDataCache.Clear(); + if (PlayFabEditorDataMenu.tdViewer != null) + PlayFabEditorDataMenu.tdViewer.items.Clear(); + PlayFabEditorDataService.SaveEnvDetails(); + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnSuccess); + } + #endregion + } +} diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorSettings.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorSettings.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..48627ff6dc68679ed832cae90bb58b6d950d8093 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorSettings.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: cab05e4a89850364e8979904f46d0433 +timeCreated: 1466458580 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorToolsMenu.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorToolsMenu.cs new file mode 100644 index 0000000000000000000000000000000000000000..5a02d10e79e3f17941cd2ab4253ed11facedd9fe --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorToolsMenu.cs @@ -0,0 +1,184 @@ +using PlayFab.PfEditor.EditorModels; +using System; +using System.Collections.Generic; +using System.IO; +using UnityEditor; +using UnityEngine; + +namespace PlayFab.PfEditor +{ + public class PlayFabEditorToolsMenu : UnityEditor.Editor + { + public static float buttonWidth = 200; + public static Vector2 scrollPos = Vector2.zero; + + public static void DrawToolsPanel() + { + scrollPos = GUILayout.BeginScrollView(scrollPos, PlayFabEditorHelper.uiStyle.GetStyle("gpStyleGray1")); + buttonWidth = EditorGUIUtility.currentViewWidth > 400 ? EditorGUIUtility.currentViewWidth / 2 : 200; + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + EditorGUILayout.LabelField("CLOUD SCRIPT:", PlayFabEditorHelper.uiStyle.GetStyle("labelStyle")); + GUILayout.Space(10); + if (GUILayout.Button("IMPORT", PlayFabEditorHelper.uiStyle.GetStyle("textButton"), GUILayout.MinHeight(30))) + { + ImportCloudScript(); + } + GUILayout.Space(10); + if (File.Exists(PlayFabEditorPrefsSO.Instance.LocalCloudScriptPath)) + { + if (GUILayout.Button("REMOVE", PlayFabEditorHelper.uiStyle.GetStyle("textButton"), GUILayout.MinHeight(30))) + { + PlayFabEditorPrefsSO.Instance.LocalCloudScriptPath = string.Empty; + PlayFabEditorDataService.SaveEnvDetails(); + } + GUILayout.Space(10); + if (GUILayout.Button("EDIT", PlayFabEditorHelper.uiStyle.GetStyle("textButton"), GUILayout.MinHeight(30))) + { + EditorUtility.OpenWithDefaultApp(PlayFabEditorPrefsSO.Instance.LocalCloudScriptPath); + } + } + } + + if (File.Exists(PlayFabEditorPrefsSO.Instance.LocalCloudScriptPath)) + { + var path = File.Exists(PlayFabEditorPrefsSO.Instance.LocalCloudScriptPath) ? PlayFabEditorPrefsSO.Instance.LocalCloudScriptPath : PlayFabEditorHelper.CLOUDSCRIPT_PATH; + var shortPath = "..." + path.Substring(path.LastIndexOf('/')); + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + GUILayout.FlexibleSpace(); + + if (GUILayout.Button(shortPath, PlayFabEditorHelper.uiStyle.GetStyle("textButton"), GUILayout.MinWidth(110), GUILayout.MinHeight(20))) + { + EditorUtility.RevealInFinder(path); + } + // GUILayout.Space(10); + // if (GUILayout.Button("EDIT LOCALLY", PlayFabEditorHelper.uiStyle.GetStyle("textButton"), GUILayout.MinWidth(90), GUILayout.MinHeight(20))) + // { + // EditorUtility.OpenWithDefaultApp(path); + // } + GUILayout.FlexibleSpace(); + } + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + GUILayout.FlexibleSpace(); + if (GUILayout.Button("SAVE TO PLAYFAB", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MinHeight(32), GUILayout.Width(buttonWidth))) + { + if (EditorUtility.DisplayDialog("Deployment Confirmation", "This action will upload your local Cloud Script changes to PlayFab?", "Continue", "Cancel")) + { + BeginCloudScriptUpload(); + } + } + GUILayout.FlexibleSpace(); + } + } + else + { + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + GUILayout.FlexibleSpace(); + EditorGUILayout.LabelField("No Cloud Script files added. Import your file to get started.", PlayFabEditorHelper.uiStyle.GetStyle("orTxt")); + GUILayout.FlexibleSpace(); + } + } + + GUILayout.EndScrollView(); + } + + private static void ImportCloudScript() + { + var dialogResponse = EditorUtility.DisplayDialogComplex("Selcet an Import Option", "What Cloud Script file do you want to import?", "Use my latest PlayFab revision", "Cancel", "Use my local file"); + switch (dialogResponse) + { + case 0: + // use PlayFab + GetCloudScriptRevision(); + break; + case 1: + // cancel + return; + case 2: + //use local + SelectLocalFile(); + break; + } + } + + private static void GetCloudScriptRevision() + { + // empty request object gets latest versions + PlayFabEditorApi.GetCloudScriptRevision(new EditorModels.GetCloudScriptRevisionRequest(), (GetCloudScriptRevisionResult result) => + { + var csPath = PlayFabEditorHelper.CLOUDSCRIPT_PATH; + var location = Path.GetDirectoryName(csPath); + try + { + if (!Directory.Exists(location)) + Directory.CreateDirectory(location); + if (!File.Exists(csPath)) + using (var newfile = File.Create(csPath)) { } + File.WriteAllText(csPath, result.Files[0].FileContents); + Debug.Log("CloudScript uploaded successfully!"); + PlayFabEditorPrefsSO.Instance.LocalCloudScriptPath = csPath; + PlayFabEditorDataService.SaveEnvDetails(); + AssetDatabase.Refresh(); + } + catch (Exception ex) + { + Debug.LogException(ex); + // PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnError, ex.Message); + return; + } + }, PlayFabEditorHelper.SharedErrorCallback); + } + + private static void SelectLocalFile() + { + var starterPath = File.Exists(PlayFabEditorPrefsSO.Instance.LocalCloudScriptPath) ? Application.dataPath : PlayFabEditorPrefsSO.Instance.LocalCloudScriptPath; + var cloudScriptPath = string.Empty; + cloudScriptPath = EditorUtility.OpenFilePanel("Select your Cloud Script file", starterPath, "js"); + + if (!string.IsNullOrEmpty(cloudScriptPath)) + { + PlayFabEditorPrefsSO.Instance.LocalCloudScriptPath = cloudScriptPath; + PlayFabEditorDataService.SaveEnvDetails(); + } + } + + private static void BeginCloudScriptUpload() + { + var filePath = File.Exists(PlayFabEditorPrefsSO.Instance.LocalCloudScriptPath) ? PlayFabEditorPrefsSO.Instance.LocalCloudScriptPath : PlayFabEditorHelper.CLOUDSCRIPT_PATH; + + if (!File.Exists(PlayFabEditorPrefsSO.Instance.LocalCloudScriptPath) && !File.Exists(PlayFabEditorHelper.CLOUDSCRIPT_PATH)) + { + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnError, "Cloud Script Upload Failed: null or corrupt file at path(" + filePath + ")."); + return; + } + + var s = File.OpenText(filePath); + var contents = s.ReadToEnd(); + s.Close(); + + var request = new UpdateCloudScriptRequest(); + request.Publish = EditorUtility.DisplayDialog("Deployment Options", "Do you want to make this Cloud Script live after uploading?", "Yes", "No"); + request.Files = new List(){ + new CloudScriptFile() { + Filename = PlayFabEditorHelper.CLOUDSCRIPT_FILENAME, + FileContents = contents + } + }; + + PlayFabEditorApi.UpdateCloudScript(request, (UpdateCloudScriptResult result) => + { + PlayFabEditorPrefsSO.Instance.LocalCloudScriptPath = filePath; + PlayFabEditorDataService.SaveEnvDetails(); + + Debug.Log("CloudScript uploaded successfully!"); + + }, PlayFabEditorHelper.SharedErrorCallback); + } + } +} diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorToolsMenu.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorToolsMenu.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..bb7038fa17958617dbbcf197c4e1727973db4daa --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorToolsMenu.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 656ebe473a0de47c885424ad7816f408 +timeCreated: 1474039500 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK.meta index 4956d18ac68c0e492dd7ab2056bab479b6a45f85..225e3823435d4d4d964d2c5bb4b1483209064412 100644 --- a/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK.meta +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK.meta @@ -1,3 +1,9 @@ -fileFormatVersion: 2 -guid: 0b0414cc4693420183595a0ff3bd0bbf -timeCreated: 1628803763 \ No newline at end of file +fileFormatVersion: 2 +guid: f0a0017f3f4fe3941b7da308a9830c25 +folderAsset: yes +timeCreated: 1468807731 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/ISerializer.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/ISerializer.cs new file mode 100644 index 0000000000000000000000000000000000000000..68f6dc4747c6c0838a98bd8c5e0829d2f99f88e9 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/ISerializer.cs @@ -0,0 +1,80 @@ +namespace PlayFab.PfEditor.Json +{ + public interface ISerializer + { + T DeserializeObject(string json); + T DeserializeObject(string json, object jsonSerializerStrategy); + object DeserializeObject(string json); + + string SerializeObject(object json); + string SerializeObject(object json, object jsonSerializerStrategy); + } + + public class JsonWrapper + { + private static ISerializer _instance = new SimpleJsonInstance(); + + /// + /// Use this property to override the Serialization for the SDK. + /// + public static ISerializer Instance + { + get { return _instance; } + set { _instance = value; } + } + + public static T DeserializeObject(string json) + { + return _instance.DeserializeObject(json); + } + + public static T DeserializeObject(string json, object jsonSerializerStrategy) + { + return _instance.DeserializeObject(json, jsonSerializerStrategy); + } + + public static object DeserializeObject(string json) + { + return _instance.DeserializeObject(json); + } + + public static string SerializeObject(object json) + { + return _instance.SerializeObject(json); + } + + public static string SerializeObject(object json, object jsonSerializerStrategy) + { + return _instance.SerializeObject(json, jsonSerializerStrategy); + } + } + + public class SimpleJsonInstance : ISerializer + { + public T DeserializeObject(string json) + { + return PlayFabSimpleJson.DeserializeObject(json); + } + + public T DeserializeObject(string json, object jsonSerializerStrategy) + { + return PlayFabSimpleJson.DeserializeObject(json, (IJsonSerializerStrategy)jsonSerializerStrategy); + } + + public object DeserializeObject(string json) + { + return PlayFabSimpleJson.DeserializeObject(json); + } + + public string SerializeObject(object json) + { + return PlayFabSimpleJson.SerializeObject(json); + } + + public string SerializeObject(object json, object jsonSerializerStrategy) + { + return PlayFabSimpleJson.SerializeObject(json, (IJsonSerializerStrategy)jsonSerializerStrategy); + } + } +} + diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/ISerializer.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/ISerializer.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..592b6d3b1e38f5a673bb73835697c1d1a3a7809c --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/ISerializer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f326e8a2f3464f246b1f3b5edd7ea59c +timeCreated: 1467153640 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorApi.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorApi.cs new file mode 100644 index 0000000000000000000000000000000000000000..6959a717ad2ed145432247189fa692a9f876f0dc --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorApi.cs @@ -0,0 +1,94 @@ +using PlayFab.PfEditor.EditorModels; +using System; +using System.Collections.Generic; + +namespace PlayFab.PfEditor +{ + public class PlayFabEditorApi + { + #region FROM EDITOR API SETS ---------------------------------------------------------------------------------------------------------------------------------------- + public static void RegisterAccount(RegisterAccountRequest request, Action resultCallback, Action errorCb) + { + PlayFabEditorHttp.MakeApiCall("/DeveloperTools/User/RegisterAccount", PlayFabEditorHelper.DEV_API_ENDPOINT, request, resultCallback, errorCb); + } + + public static void Login(LoginRequest request, Action resultCallback, Action errorCb) + { + PlayFabEditorHttp.MakeApiCall("/DeveloperTools/User/Login", PlayFabEditorHelper.DEV_API_ENDPOINT, request, resultCallback, errorCb); + } + + public static void Logout(LogoutRequest request, Action resultCallback, + Action errorCb) + { + PlayFabEditorHttp.MakeApiCall("/DeveloperTools/User/Logout", PlayFabEditorHelper.DEV_API_ENDPOINT, request, resultCallback, errorCb); + } + + public static void GetStudios(GetStudiosRequest request, Action resultCallback, Action errorCb) + { + var token = PlayFabEditorPrefsSO.Instance.DevAccountToken; + request.DeveloperClientToken = token; + PlayFabEditorHttp.MakeApiCall("/DeveloperTools/User/GetStudios", PlayFabEditorHelper.DEV_API_ENDPOINT, request, resultCallback, errorCb); + } + + public static void CreateTitle(CreateTitleRequest request, Action resultCallback, Action errorCb) + { + var token = PlayFabEditorPrefsSO.Instance.DevAccountToken; + request.DeveloperClientToken = token; + PlayFabEditorHttp.MakeApiCall("/DeveloperTools/User/CreateTitle", PlayFabEditorHelper.DEV_API_ENDPOINT, request, resultCallback, errorCb); + } + #endregion + + #region FROM ADMIN / SERVER API SETS ---------------------------------------------------------------------------------------------------------------------------------------- + public static void GetTitleData(Action resultCb, Action errorCb) + { + var titleId = PlayFabEditorDataService.SharedSettings.TitleId; + var apiEndpoint = "https://" + titleId + PlayFabEditorHelper.TITLE_ENDPOINT; + PlayFabEditorHttp.MakeApiCall("/Admin/GetTitleData", apiEndpoint, new GetTitleDataRequest(), resultCb, errorCb); + } + + public static void SetTitleData(Dictionary keys, Action resultCb, Action errorCb) + { + foreach (var pair in keys) + { + var req = new SetTitleDataRequest { Key = pair.Key, Value = pair.Value }; + + var titleId = PlayFabEditorDataService.SharedSettings.TitleId; + var apiEndpoint = "https://" + titleId + PlayFabEditorHelper.TITLE_ENDPOINT; + PlayFabEditorHttp.MakeApiCall("/Admin/SetTitleData", apiEndpoint, req, resultCb, errorCb); + } + } + public static void GetTitleInternalData(Action resultCb, Action errorCb) + { + var titleId = PlayFabEditorDataService.SharedSettings.TitleId; + var apiEndpoint = "https://" + titleId + PlayFabEditorHelper.TITLE_ENDPOINT; + PlayFabEditorHttp.MakeApiCall("/Admin/GetTitleInternalData", apiEndpoint, new GetTitleDataRequest(), resultCb, errorCb); + } + + public static void SetTitleInternalData(Dictionary keys, Action resultCb, Action errorCb) + { + foreach (var pair in keys) + { + var req = new SetTitleDataRequest { Key = pair.Key, Value = pair.Value }; + + var titleId = PlayFabEditorDataService.SharedSettings.TitleId; + var apiEndpoint = "https://" + titleId + PlayFabEditorHelper.TITLE_ENDPOINT; + PlayFabEditorHttp.MakeApiCall("/Admin/SetTitleInternalData", apiEndpoint, req, resultCb, errorCb); + } + } + + public static void UpdateCloudScript(UpdateCloudScriptRequest request, Action resultCb, Action errorCb) + { + var titleId = PlayFabEditorDataService.SharedSettings.TitleId; + var apiEndpoint = "https://" + titleId + PlayFabEditorHelper.TITLE_ENDPOINT; + PlayFabEditorHttp.MakeApiCall("/Admin/UpdateCloudScript", apiEndpoint, request, resultCb, errorCb); + } + + public static void GetCloudScriptRevision(GetCloudScriptRevisionRequest request, Action resultCb, Action errorCb) + { + var titleId = PlayFabEditorDataService.SharedSettings.TitleId; + var apiEndpoint = "https://" + titleId + PlayFabEditorHelper.TITLE_ENDPOINT; + PlayFabEditorHttp.MakeApiCall("/Admin/GetCloudScriptRevision", apiEndpoint, request, resultCb, errorCb); + } + #endregion + } +} diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorApi.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorApi.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..6d8591e8b375121bd6ffcad98e3b1ba25430d0a7 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorApi.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 78d90281a98aa9c47af733ae62f11a73 +timeCreated: 1466719777 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorHttp.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorHttp.cs new file mode 100644 index 0000000000000000000000000000000000000000..bd9eed7e51b04d1f13dd50475fc6ee3611fa2896 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorHttp.cs @@ -0,0 +1,227 @@ +using UnityEngine; +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using PlayFab.PfEditor.Json; +using PlayFab.PfEditor.EditorModels; +using UnityEngine.Networking; + +namespace PlayFab.PfEditor +{ + public class PlayFabEditorHttp : UnityEditor.Editor + { + internal static void MakeDownloadCall(string url, Action resultCallback) + { +#if UNITY_2018_2_OR_NEWER + UnityWebRequest www = UnityWebRequest.Get(url); + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnHttpReq, url, PlayFabEditorHelper.MSG_SPIN_BLOCK); + EditorCoroutine.Start(PostDownload(www, (response) => { WriteResultFile(url, resultCallback, response); }, PlayFabEditorHelper.SharedErrorCallback), www); +#else + var www = new WWW(url); + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnHttpReq, url, PlayFabEditorHelper.MSG_SPIN_BLOCK); + EditorCoroutine.Start(PostDownload(www, (response) => { WriteResultFile(url, resultCallback, response); }, PlayFabEditorHelper.SharedErrorCallback), www); +#endif + } + + private static void WriteResultFile(string url, Action resultCallback, byte[] response) + { + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnHttpRes, url); + + string fileName; + if (url.IndexOf("unity-edex") > -1) + fileName = PlayFabEditorHelper.EDEX_UPGRADE_PATH; + else if (url.IndexOf("unity-via-edex") > -1) + fileName = PlayFabEditorHelper.SDK_DOWNLOAD_PATH; + else + fileName = PlayFabEditorHelper.EDEX_PACKAGES_PATH; + + var fileSaveLocation = PlayFabEditorHelper.EDEX_ROOT + fileName; + var fileSaveDirectory = Path.GetDirectoryName(fileSaveLocation); + Debug.Log("Saving " + response.Length + " bytes to: " + fileSaveLocation); + if (!Directory.Exists(fileSaveDirectory)) + Directory.CreateDirectory(fileSaveDirectory); + File.WriteAllBytes(fileSaveLocation, response); + resultCallback(fileSaveLocation); + } + + internal static void MakeApiCall(string api, string apiEndpoint, TRequestType request, Action resultCallback, Action errorCallback) where TResultType : class + { + var url = apiEndpoint + api; + var req = JsonWrapper.SerializeObject(request, PlayFabEditorUtil.ApiSerializerStrategy); + //Set headers + var headers = new Dictionary + { + {"Content-Type", "application/json"}, + {"X-ReportErrorAsSuccess", "true"}, + {"X-PlayFabSDK", PlayFabEditorHelper.EDEX_NAME + "_" + PlayFabEditorHelper.EDEX_VERSION} + }; + + if (api.Contains("/Server/") || api.Contains("/Admin/")) + { + if (PlayFabEditorDataService.ActiveTitle == null || string.IsNullOrEmpty(PlayFabEditorDataService.ActiveTitle.SecretKey)) + { + PlayFabEditorDataService.RefreshStudiosList(); + return; + } + + headers.Add("X-SecretKey", PlayFabEditorDataService.ActiveTitle.SecretKey); + } + + //Encode Payload + var payload = System.Text.Encoding.UTF8.GetBytes(req.Trim()); +#if UNITY_2018_2_OR_NEWER + var www = new UnityWebRequest(url) + { + uploadHandler = new UploadHandlerRaw(payload), + downloadHandler = new DownloadHandlerBuffer(), + method = "POST" + }; + + foreach (var header in headers) + { + if (!string.IsNullOrEmpty(header.Key) && !string.IsNullOrEmpty(header.Value)) + { + www.SetRequestHeader(header.Key, header.Value); + } + else + { + UnityEngine.Debug.LogWarning("Null header"); + } + } + + + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnHttpReq, api, PlayFabEditorHelper.MSG_SPIN_BLOCK); + EditorCoroutine.Start(Post(www, (response) => { OnWwwSuccess(api, resultCallback, errorCallback, response); }, (error) => { OnWwwError(errorCallback, error); }), www); +#else + var www = new WWW(url, payload, headers); + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnHttpReq, api, PlayFabEditorHelper.MSG_SPIN_BLOCK); + EditorCoroutine.Start(Post(www, (response) => { OnWwwSuccess(api, resultCallback, errorCallback, response); }, (error) => { OnWwwError(errorCallback, error); }), www); +#endif + } + + private static void OnWwwSuccess(string api, Action resultCallback, Action errorCallback, string response) where TResultType : class + { + var httpResult = JsonWrapper.DeserializeObject(response, PlayFabEditorUtil.ApiSerializerStrategy); + if (httpResult.code != 200) + { + OnWwwError(errorCallback, response); + return; + } + + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnHttpRes, api); + if (resultCallback == null) + return; + + TResultType result = null; + var resultAssigned = false; + + var dataJson = JsonWrapper.SerializeObject(httpResult.data, PlayFabEditorUtil.ApiSerializerStrategy); + result = JsonWrapper.DeserializeObject(dataJson, PlayFabEditorUtil.ApiSerializerStrategy); + resultAssigned = true; + + if (resultAssigned) + resultCallback(result); + } + + private static void OnWwwError(Action errorCallback, string error) + { + if (errorCallback != null) + errorCallback(PlayFabEditorHelper.GeneratePlayFabError(error)); + else + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnError, "OnWwwError" + error); + } + + internal static void MakeGitHubApiCall(string url, Action resultCallback) + { +#if UNITY_2018_2_OR_NEWER + UnityWebRequest webReq = UnityWebRequest.Get(url); + EditorCoroutine.Start(Post(webReq, (response) => { OnGitHubSuccess(resultCallback, response); }, PlayFabEditorHelper.SharedErrorCallback), webReq); +#else + var www = new WWW(url); + EditorCoroutine.Start(Post(www, (response) => { OnGitHubSuccess(resultCallback, response); }, PlayFabEditorHelper.SharedErrorCallback), www); +#endif + } + + private static void OnGitHubSuccess(Action resultCallback, string response) + { + if (resultCallback == null) + return; + + var jsonResponse = JsonWrapper.DeserializeObject>(response); + if (jsonResponse == null || jsonResponse.Count == 0) + return; + + // list seems to come back in ascending order (oldest -> newest) + var latestSdkTag = (JsonObject)jsonResponse[jsonResponse.Count - 1]; + object tag; + if (latestSdkTag.TryGetValue("ref", out tag)) + { + var startIndex = tag.ToString().LastIndexOf('/') + 1; + var length = tag.ToString().Length - startIndex; + resultCallback(tag.ToString().Substring(startIndex, length)); + } + else + { + resultCallback(null); + } + } +#if UNITY_2018_2_OR_NEWER + private static IEnumerator Post(UnityWebRequest www, Action callBack, Action errorCallback) + { + if (www != null) + { + yield return www.SendWebRequest(); + + if (!string.IsNullOrEmpty(www.error)) + errorCallback(www.error); + else + callBack(www.downloadHandler.text); + } + else + { + UnityEngine.Debug.Log("UnityWebRequest was null"); + errorCallback("UnityWebRequest Object was null"); + } + } + + private static IEnumerator PostDownload(UnityWebRequest www, Action callBack, Action errorCallback) + { + if (www != null) + { + yield return www.SendWebRequest(); + + if (!string.IsNullOrEmpty(www.error) || www.isHttpError) + errorCallback(www.error); + else + callBack(www.downloadHandler.data); + } + else + { + UnityEngine.Debug.Log("UnityWebRequest was null"); + errorCallback("UnityWebRequest Object was null"); + } + } +#else + private static IEnumerator Post(WWW www, Action callBack, Action errorCallback) + { + yield return www; + + if (!string.IsNullOrEmpty(www.error)) + errorCallback(www.error); + else + callBack(www.text); + } + + private static IEnumerator PostDownload(WWW www, Action callBack, Action errorCallback) + { + yield return www; + + if (!string.IsNullOrEmpty(www.error)) + errorCallback(www.error); + else + callBack(www.bytes); + } +#endif + } +} diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorHttp.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorHttp.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..07e443c5bd87fb55ecf8e95272800f10dab8ea13 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorHttp.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f495d2bd2522f354d82ab4c043cbc727 +timeCreated: 1466703757 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorModels.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorModels.cs new file mode 100644 index 0000000000000000000000000000000000000000..231050d0805d5b1c97e9eb16ba97f75256ee939a --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorModels.cs @@ -0,0 +1,463 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace PlayFab.PfEditor.EditorModels +{ + public class RegisterAccountRequest + { + public string Email; + public string Password; + public string StudioName; + public string DeveloperToolProductName; + public string DeveloperToolProductVersion; + } + + public class RegisterAccountResult + { + public string DeveloperClientToken; + } + + public class LoginRequest + { + public string Email; + public string Password; + public string TwoFactorAuth; + public string DeveloperToolProductName; + public string DeveloperToolProductVersion; + } + + public class LoginResult + { + public string DeveloperClientToken; + } + + public class LogoutRequest + { + public string DeveloperClientToken; + } + + public class LogoutResult + { + } + + public class GetStudiosRequest + { + public string DeveloperClientToken; + } + + public class GetStudiosResult + { + public Studio[] Studios; + } + + public class CreateTitleRequest + { + public string DeveloperClientToken; + public string Name; + public string StudioId; + } + + public class CreateTitleResult + { + public Title Title; + } + + public class Title + { + public string Id; + public string Name; + public string SecretKey; + public string GameManagerUrl; + } + + public class Studio + { + public static Studio OVERRIDE = new Studio { Id = "", Name = PlayFabEditorHelper.STUDIO_OVERRIDE, Titles = null }; + + public string Id; + public string Name; + + public Title[] Titles; + + public Title GetTitle(string titleId) + { + if (Titles == null) + return null; + for (var i = 0; i < Titles.Length; i++) + if (Titles[i].Id == titleId) + return Titles[i]; + return null; + } + + public string GetTitleSecretKey(string titleId) + { + var title = GetTitle(titleId); + return title == null ? "" : title.SecretKey; + } + } + + public class GetTitleDataRequest + { + public List Keys; + } + + public class GetTitleDataResult + { + public Dictionary Data; + } + + public class SetTitleDataRequest + { + public string Key; + public string Value; + } + + public class SetTitleDataResult + { + } + + public class CloudScriptFile + { + public string Filename; + public string FileContents; + } + + public class UpdateCloudScriptRequest + { + public List Files; + public bool Publish; + public string DeveloperPlayFabId; + } + + public class UpdateCloudScriptResult + { + public int Version; + public int Revision; + } + + public class GetCloudScriptRevisionRequest + { + public int? Version; + public int? Revision; + } + + public class GetCloudScriptRevisionResult + { + public int Version; + public int Revision; + public System.DateTime CreatedAt; + public List Files; + public bool IsPublished; + } + + public class PlayFabError + { + public int HttpCode; + public string HttpStatus; + public PlayFabErrorCode Error; + public string ErrorMessage; + public Dictionary> ErrorDetails; + public object CustomData; + + [ThreadStatic] + private static StringBuilder _tempSb; + public string GenerateErrorReport() + { + if (_tempSb == null) + _tempSb = new StringBuilder(); + _tempSb.Length = 0; + _tempSb.Append(ErrorMessage); + if (ErrorDetails != null) + foreach (var pair in ErrorDetails) + foreach (var msg in pair.Value) + _tempSb.Append("\n").Append(pair.Key).Append(": ").Append(msg); + return _tempSb.ToString(); + } + } + + public class HttpResponseObject + { + public int code; + public string status; + public object data; + } + + public enum PlayFabErrorCode + { + Unknown = 1, + Success = 0, + InvalidParams = 1000, + AccountNotFound = 1001, + AccountBanned = 1002, + InvalidUsernameOrPassword = 1003, + InvalidTitleId = 1004, + InvalidEmailAddress = 1005, + EmailAddressNotAvailable = 1006, + InvalidUsername = 1007, + InvalidPassword = 1008, + UsernameNotAvailable = 1009, + InvalidSteamTicket = 1010, + AccountAlreadyLinked = 1011, + LinkedAccountAlreadyClaimed = 1012, + InvalidFacebookToken = 1013, + AccountNotLinked = 1014, + FailedByPaymentProvider = 1015, + CouponCodeNotFound = 1016, + InvalidContainerItem = 1017, + ContainerNotOwned = 1018, + KeyNotOwned = 1019, + InvalidItemIdInTable = 1020, + InvalidReceipt = 1021, + ReceiptAlreadyUsed = 1022, + ReceiptCancelled = 1023, + GameNotFound = 1024, + GameModeNotFound = 1025, + InvalidGoogleToken = 1026, + UserIsNotPartOfDeveloper = 1027, + InvalidTitleForDeveloper = 1028, + TitleNameConflicts = 1029, + UserisNotValid = 1030, + ValueAlreadyExists = 1031, + BuildNotFound = 1032, + PlayerNotInGame = 1033, + InvalidTicket = 1034, + InvalidDeveloper = 1035, + InvalidOrderInfo = 1036, + RegistrationIncomplete = 1037, + InvalidPlatform = 1038, + UnknownError = 1039, + SteamApplicationNotOwned = 1040, + WrongSteamAccount = 1041, + TitleNotActivated = 1042, + RegistrationSessionNotFound = 1043, + NoSuchMod = 1044, + FileNotFound = 1045, + DuplicateEmail = 1046, + ItemNotFound = 1047, + ItemNotOwned = 1048, + ItemNotRecycleable = 1049, + ItemNotAffordable = 1050, + InvalidVirtualCurrency = 1051, + WrongVirtualCurrency = 1052, + WrongPrice = 1053, + NonPositiveValue = 1054, + InvalidRegion = 1055, + RegionAtCapacity = 1056, + ServerFailedToStart = 1057, + NameNotAvailable = 1058, + InsufficientFunds = 1059, + InvalidDeviceID = 1060, + InvalidPushNotificationToken = 1061, + NoRemainingUses = 1062, + InvalidPaymentProvider = 1063, + PurchaseInitializationFailure = 1064, + DuplicateUsername = 1065, + InvalidBuyerInfo = 1066, + NoGameModeParamsSet = 1067, + BodyTooLarge = 1068, + ReservedWordInBody = 1069, + InvalidTypeInBody = 1070, + InvalidRequest = 1071, + ReservedEventName = 1072, + InvalidUserStatistics = 1073, + NotAuthenticated = 1074, + StreamAlreadyExists = 1075, + ErrorCreatingStream = 1076, + StreamNotFound = 1077, + InvalidAccount = 1078, + PurchaseDoesNotExist = 1080, + InvalidPurchaseTransactionStatus = 1081, + APINotEnabledForGameClientAccess = 1082, + NoPushNotificationARNForTitle = 1083, + BuildAlreadyExists = 1084, + BuildPackageDoesNotExist = 1085, + CustomAnalyticsEventsNotEnabledForTitle = 1087, + InvalidSharedGroupId = 1088, + NotAuthorized = 1089, + MissingTitleGoogleProperties = 1090, + InvalidItemProperties = 1091, + InvalidPSNAuthCode = 1092, + InvalidItemId = 1093, + PushNotEnabledForAccount = 1094, + PushServiceError = 1095, + ReceiptDoesNotContainInAppItems = 1096, + ReceiptContainsMultipleInAppItems = 1097, + InvalidBundleID = 1098, + JavascriptException = 1099, + InvalidSessionTicket = 1100, + UnableToConnectToDatabase = 1101, + InternalServerError = 1110, + InvalidReportDate = 1111, + ReportNotAvailable = 1112, + DatabaseThroughputExceeded = 1113, + InvalidLobbyId = 1114, + InvalidGameTicket = 1115, + ExpiredGameTicket = 1116, + GameTicketDoesNotMatchLobby = 1117, + LinkedDeviceAlreadyClaimed = 1118, + DeviceAlreadyLinked = 1119, + DeviceNotLinked = 1120, + PartialFailure = 1121, + PublisherNotSet = 1122, + ServiceUnavailable = 1123, + VersionNotFound = 1124, + RevisionNotFound = 1125, + InvalidPublisherId = 1126, + DownstreamServiceUnavailable = 1127, + APINotIncludedInTitleUsageTier = 1128, + DAULimitExceeded = 1129, + APIRequestLimitExceeded = 1130, + InvalidAPIEndpoint = 1131, + BuildNotAvailable = 1132, + ConcurrentEditError = 1133, + ContentNotFound = 1134, + CharacterNotFound = 1135, + CloudScriptNotFound = 1136, + ContentQuotaExceeded = 1137, + InvalidCharacterStatistics = 1138, + PhotonNotEnabledForTitle = 1139, + PhotonApplicationNotFound = 1140, + PhotonApplicationNotAssociatedWithTitle = 1141, + InvalidEmailOrPassword = 1142, + FacebookAPIError = 1143, + InvalidContentType = 1144, + KeyLengthExceeded = 1145, + DataLengthExceeded = 1146, + TooManyKeys = 1147, + FreeTierCannotHaveVirtualCurrency = 1148, + MissingAmazonSharedKey = 1149, + AmazonValidationError = 1150, + InvalidPSNIssuerId = 1151, + PSNInaccessible = 1152, + ExpiredAuthToken = 1153, + FailedToGetEntitlements = 1154, + FailedToConsumeEntitlement = 1155, + TradeAcceptingUserNotAllowed = 1156, + TradeInventoryItemIsAssignedToCharacter = 1157, + TradeInventoryItemIsBundle = 1158, + TradeStatusNotValidForCancelling = 1159, + TradeStatusNotValidForAccepting = 1160, + TradeDoesNotExist = 1161, + TradeCancelled = 1162, + TradeAlreadyFilled = 1163, + TradeWaitForStatusTimeout = 1164, + TradeInventoryItemExpired = 1165, + TradeMissingOfferedAndAcceptedItems = 1166, + TradeAcceptedItemIsBundle = 1167, + TradeAcceptedItemIsStackable = 1168, + TradeInventoryItemInvalidStatus = 1169, + TradeAcceptedCatalogItemInvalid = 1170, + TradeAllowedUsersInvalid = 1171, + TradeInventoryItemDoesNotExist = 1172, + TradeInventoryItemIsConsumed = 1173, + TradeInventoryItemIsStackable = 1174, + TradeAcceptedItemsMismatch = 1175, + InvalidKongregateToken = 1176, + FeatureNotConfiguredForTitle = 1177, + NoMatchingCatalogItemForReceipt = 1178, + InvalidCurrencyCode = 1179, + NoRealMoneyPriceForCatalogItem = 1180, + TradeInventoryItemIsNotTradable = 1181, + TradeAcceptedCatalogItemIsNotTradable = 1182, + UsersAlreadyFriends = 1183, + LinkedIdentifierAlreadyClaimed = 1184, + CustomIdNotLinked = 1185, + TotalDataSizeExceeded = 1186, + DeleteKeyConflict = 1187, + InvalidXboxLiveToken = 1188, + ExpiredXboxLiveToken = 1189, + ResettableStatisticVersionRequired = 1190, + NotAuthorizedByTitle = 1191, + NoPartnerEnabled = 1192, + InvalidPartnerResponse = 1193, + APINotEnabledForGameServerAccess = 1194, + StatisticNotFound = 1195, + StatisticNameConflict = 1196, + StatisticVersionClosedForWrites = 1197, + StatisticVersionInvalid = 1198, + APIClientRequestRateLimitExceeded = 1199, + InvalidJSONContent = 1200, + InvalidDropTable = 1201, + StatisticVersionAlreadyIncrementedForScheduledInterval = 1202, + StatisticCountLimitExceeded = 1203, + StatisticVersionIncrementRateExceeded = 1204, + ContainerKeyInvalid = 1205, + CloudScriptExecutionTimeLimitExceeded = 1206, + NoWritePermissionsForEvent = 1207, + CloudScriptFunctionArgumentSizeExceeded = 1208, + CloudScriptAPIRequestCountExceeded = 1209, + CloudScriptAPIRequestError = 1210, + CloudScriptHTTPRequestError = 1211, + InsufficientGuildRole = 1212, + GuildNotFound = 1213, + OverLimit = 1214, + EventNotFound = 1215, + InvalidEventField = 1216, + InvalidEventName = 1217, + CatalogNotConfigured = 1218, + OperationNotSupportedForPlatform = 1219, + SegmentNotFound = 1220, + StoreNotFound = 1221, + InvalidStatisticName = 1222, + TitleNotQualifiedForLimit = 1223, + InvalidServiceLimitLevel = 1224, + ServiceLimitLevelInTransition = 1225, + CouponAlreadyRedeemed = 1226, + GameServerBuildSizeLimitExceeded = 1227, + GameServerBuildCountLimitExceeded = 1228, + VirtualCurrencyCountLimitExceeded = 1229, + VirtualCurrencyCodeExists = 1230, + TitleNewsItemCountLimitExceeded = 1231, + InvalidTwitchToken = 1232, + TwitchResponseError = 1233, + ProfaneDisplayName = 1234, + TwoFactorAuthenticationTokenRequired = 1246 + } + + #region Misc UI Models + public class StudioDisplaySet + { + public PlayFab.PfEditor.EditorModels.Studio Studio; + public bool isCollapsed = true; + public Dictionary titleFoldOutStates = new Dictionary(); + } + + public class TitleDisplaySet + { + public PlayFab.PfEditor.EditorModels.Title Title; + public bool isCollapsed = true; + } + + public class KvpItem + { + public string Key; + public string Value; + public string _prvKey; + public string _prvValue; + public bool isDirty; + + public KvpItem(string k, string v) + { + Key = k; + Value = v; + + _prvKey = k; + _prvValue = v; + } + + public void CleanItem() + { + _prvKey = Key; + _prvValue = Value; + isDirty = false; + } + + public void DataEditedCheck() + { + if (Key != _prvKey || Value != _prvValue) + isDirty = true; + } + } + #endregion +} diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorModels.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorModels.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..ac216148059c08f11b7ee461253066db2a3ce1eb --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorModels.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9115cedc892e0c845941e0cb3f98bd3b +timeCreated: 1466719838 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/SimpleJson.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/SimpleJson.cs new file mode 100644 index 0000000000000000000000000000000000000000..05d65f24bd25c36c4cf987839829dfdfa3462848 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/SimpleJson.cs @@ -0,0 +1,2047 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) 2011, The Outercurve Foundation. +// +// Licensed under the MIT License (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.opensource.org/licenses/mit-license.php +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me) +// https://github.com/facebook-csharp-sdk/simple-json +//----------------------------------------------------------------------- + +// VERSION: + +// NOTE: uncomment the following line to make SimpleJson class internal. +//#define SIMPLE_JSON_INTERNAL + +// NOTE: uncomment the following line to make JsonArray and JsonObject class internal. +//#define SIMPLE_JSON_OBJARRAYINTERNAL + +// NOTE: uncomment the following line to enable dynamic support. +//#define SIMPLE_JSON_DYNAMIC + +// NOTE: uncomment the following line to enable DataContract support. +//#define SIMPLE_JSON_DATACONTRACT + +// NOTE: uncomment the following line to enable IReadOnlyCollection and IReadOnlyList support. +//#define SIMPLE_JSON_READONLY_COLLECTIONS + +// NOTE: uncomment the following line if you are compiling under Window Metro style application/library. +// usually already defined in properties +#if UNITY_WSA && UNITY_WP8 +#define NETFX_CORE +#endif + +// If you are targetting WinStore, WP8 and NET4.5+ PCL make sure to +#if UNITY_WP8 || UNITY_WP8_1 || UNITY_WSA +// #define SIMPLE_JSON_TYPEINFO +#endif + +// original json parsing code from http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html + +#if NETFX_CORE +#define SIMPLE_JSON_TYPEINFO +#endif + +using System; +using System.CodeDom.Compiler; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; +#if SIMPLE_JSON_DYNAMIC +using System.Dynamic; +#endif +using System.Globalization; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.Serialization; +using System.Text; + +// ReSharper disable LoopCanBeConvertedToQuery +// ReSharper disable RedundantExplicitArrayCreation +// ReSharper disable SuggestUseVarKeywordEvident +namespace PlayFab.PfEditor.Json +{ + /// + /// Represents the json array. + /// + [GeneratedCode("simple-json", "1.0.0")] + [EditorBrowsable(EditorBrowsableState.Never)] + [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")] +#if SIMPLE_JSON_OBJARRAYINTERNAL + internal +#else + public +#endif + class JsonArray : List + { + /// + /// Initializes a new instance of the class. + /// + public JsonArray() { } + + /// + /// Initializes a new instance of the class. + /// + /// The capacity of the json array. + public JsonArray(int capacity) : base(capacity) { } + + /// + /// The json representation of the array. + /// + /// The json representation of the array. + public override string ToString() + { + return PlayFabSimpleJson.SerializeObject(this) ?? string.Empty; + } + } + + /// + /// Represents the json object. + /// + [GeneratedCode("simple-json", "1.0.0")] + [EditorBrowsable(EditorBrowsableState.Never)] + [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")] +#if SIMPLE_JSON_OBJARRAYINTERNAL + internal +#else + public +#endif + class JsonObject : +#if SIMPLE_JSON_DYNAMIC + DynamicObject, +#endif + IDictionary + { + /// + /// The internal member dictionary. + /// + private readonly Dictionary _members; + + /// + /// Initializes a new instance of . + /// + public JsonObject() + { + _members = new Dictionary(); + } + + /// + /// Initializes a new instance of . + /// + /// The implementation to use when comparing keys, or null to use the default for the type of the key. + public JsonObject(IEqualityComparer comparer) + { + _members = new Dictionary(comparer); + } + + /// + /// Gets the at the specified index. + /// + /// + public object this[int index] + { + get { return GetAtIndex(_members, index); } + } + + internal static object GetAtIndex(IDictionary obj, int index) + { + if (obj == null) + throw new ArgumentNullException("obj"); + if (index >= obj.Count) + throw new ArgumentOutOfRangeException("index"); + int i = 0; + foreach (KeyValuePair o in obj) + if (i++ == index) return o.Value; + return null; + } + + /// + /// Adds the specified key. + /// + /// The key. + /// The value. + public void Add(string key, object value) + { + _members.Add(key, value); + } + + /// + /// Determines whether the specified key contains key. + /// + /// The key. + /// + /// true if the specified key contains key; otherwise, false. + /// + public bool ContainsKey(string key) + { + return _members.ContainsKey(key); + } + + /// + /// Gets the keys. + /// + /// The keys. + public ICollection Keys + { + get { return _members.Keys; } + } + + /// + /// Removes the specified key. + /// + /// The key. + /// + public bool Remove(string key) + { + return _members.Remove(key); + } + + /// + /// Tries the get value. + /// + /// The key. + /// The value. + /// + public bool TryGetValue(string key, out object value) + { + return _members.TryGetValue(key, out value); + } + + /// + /// Gets the values. + /// + /// The values. + public ICollection Values + { + get { return _members.Values; } + } + + /// + /// Gets or sets the with the specified key. + /// + /// + public object this[string key] + { + get { return _members[key]; } + set { _members[key] = value; } + } + + /// + /// Adds the specified item. + /// + /// The item. + public void Add(KeyValuePair item) + { + _members.Add(item.Key, item.Value); + } + + /// + /// Clears this instance. + /// + public void Clear() + { + _members.Clear(); + } + + /// + /// Determines whether [contains] [the specified item]. + /// + /// The item. + /// + /// true if [contains] [the specified item]; otherwise, false. + /// + public bool Contains(KeyValuePair item) + { + return _members.ContainsKey(item.Key) && _members[item.Key] == item.Value; + } + + /// + /// Copies to. + /// + /// The array. + /// Index of the array. + public void CopyTo(KeyValuePair[] array, int arrayIndex) + { + if (array == null) throw new ArgumentNullException("array"); + int num = Count; + foreach (KeyValuePair kvp in this) + { + array[arrayIndex++] = kvp; + if (--num <= 0) + return; + } + } + + /// + /// Gets the count. + /// + /// The count. + public int Count + { + get { return _members.Count; } + } + + /// + /// Gets a value indicating whether this instance is read only. + /// + /// + /// true if this instance is read only; otherwise, false. + /// + public bool IsReadOnly + { + get { return false; } + } + + /// + /// Removes the specified item. + /// + /// The item. + /// + public bool Remove(KeyValuePair item) + { + return _members.Remove(item.Key); + } + + /// + /// Gets the enumerator. + /// + /// + public IEnumerator> GetEnumerator() + { + return _members.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through a collection. + /// + /// + /// An object that can be used to iterate through the collection. + /// + IEnumerator IEnumerable.GetEnumerator() + { + return _members.GetEnumerator(); + } + + /// + /// Returns a json that represents the current . + /// + /// + /// A json that represents the current . + /// + public override string ToString() + { + return PlayFabSimpleJson.SerializeObject(this); + } + +#if SIMPLE_JSON_DYNAMIC + /// + /// Provides implementation for type conversion operations. Classes derived from the class can override this method to specify dynamic behavior for operations that convert an object from one type to another. + /// + /// Provides information about the conversion operation. The binder.Type property provides the type to which the object must be converted. For example, for the statement (String)sampleObject in C# (CType(sampleObject, Type) in Visual Basic), where sampleObject is an instance of the class derived from the class, binder.Type returns the type. The binder.Explicit property provides information about the kind of conversion that occurs. It returns true for explicit conversion and false for implicit conversion. + /// The result of the type conversion operation. + /// + /// Alwasy returns true. + /// + public override bool TryConvert(ConvertBinder binder, out object result) + { + // + if (binder == null) + throw new ArgumentNullException("binder"); + // + Type targetType = binder.Type; + + if ((targetType == typeof(IEnumerable)) || + (targetType == typeof(IEnumerable>)) || + (targetType == typeof(IDictionary)) || + (targetType == typeof(IDictionary))) + { + result = this; + return true; + } + + return base.TryConvert(binder, out result); + } + + /// + /// Provides the implementation for operations that delete an object member. This method is not intended for use in C# or Visual Basic. + /// + /// Provides information about the deletion. + /// + /// Alwasy returns true. + /// + public override bool TryDeleteMember(DeleteMemberBinder binder) + { + // + if (binder == null) + throw new ArgumentNullException("binder"); + // + return _members.Remove(binder.Name); + } + + /// + /// Provides the implementation for operations that get a value by index. Classes derived from the class can override this method to specify dynamic behavior for indexing operations. + /// + /// Provides information about the operation. + /// The indexes that are used in the operation. For example, for the sampleObject[3] operation in C# (sampleObject(3) in Visual Basic), where sampleObject is derived from the DynamicObject class, is equal to 3. + /// The result of the index operation. + /// + /// Alwasy returns true. + /// + public override bool TryGetIndex(GetIndexBinder binder, object[] indexes, out object result) + { + if (indexes == null) throw new ArgumentNullException("indexes"); + if (indexes.Length == 1) + { + result = ((IDictionary)this)[(string)indexes[0]]; + return true; + } + result = null; + return true; + } + + /// + /// Provides the implementation for operations that get member values. Classes derived from the class can override this method to specify dynamic behavior for operations such as getting a value for a property. + /// + /// Provides information about the object that called the dynamic operation. The binder.Name property provides the name of the member on which the dynamic operation is performed. For example, for the Console.WriteLine(sampleObject.SampleProperty) statement, where sampleObject is an instance of the class derived from the class, binder.Name returns "SampleProperty". The binder.IgnoreCase property specifies whether the member name is case-sensitive. + /// The result of the get operation. For example, if the method is called for a property, you can assign the property value to . + /// + /// Alwasy returns true. + /// + public override bool TryGetMember(GetMemberBinder binder, out object result) + { + object value; + if (_members.TryGetValue(binder.Name, out value)) + { + result = value; + return true; + } + result = null; + return true; + } + + /// + /// Provides the implementation for operations that set a value by index. Classes derived from the class can override this method to specify dynamic behavior for operations that access objects by a specified index. + /// + /// Provides information about the operation. + /// The indexes that are used in the operation. For example, for the sampleObject[3] = 10 operation in C# (sampleObject(3) = 10 in Visual Basic), where sampleObject is derived from the class, is equal to 3. + /// The value to set to the object that has the specified index. For example, for the sampleObject[3] = 10 operation in C# (sampleObject(3) = 10 in Visual Basic), where sampleObject is derived from the class, is equal to 10. + /// + /// true if the operation is successful; otherwise, false. If this method returns false, the run-time binder of the language determines the behavior. (In most cases, a language-specific run-time exception is thrown. + /// + public override bool TrySetIndex(SetIndexBinder binder, object[] indexes, object value) + { + if (indexes == null) throw new ArgumentNullException("indexes"); + if (indexes.Length == 1) + { + ((IDictionary)this)[(string)indexes[0]] = value; + return true; + } + return base.TrySetIndex(binder, indexes, value); + } + + /// + /// Provides the implementation for operations that set member values. Classes derived from the class can override this method to specify dynamic behavior for operations such as setting a value for a property. + /// + /// Provides information about the object that called the dynamic operation. The binder.Name property provides the name of the member to which the value is being assigned. For example, for the statement sampleObject.SampleProperty = "Test", where sampleObject is an instance of the class derived from the class, binder.Name returns "SampleProperty". The binder.IgnoreCase property specifies whether the member name is case-sensitive. + /// The value to set to the member. For example, for sampleObject.SampleProperty = "Test", where sampleObject is an instance of the class derived from the class, the is "Test". + /// + /// true if the operation is successful; otherwise, false. If this method returns false, the run-time binder of the language determines the behavior. (In most cases, a language-specific run-time exception is thrown.) + /// + public override bool TrySetMember(SetMemberBinder binder, object value) + { + // + if (binder == null) + throw new ArgumentNullException("binder"); + // + _members[binder.Name] = value; + return true; + } + + /// + /// Returns the enumeration of all dynamic member names. + /// + /// + /// A sequence that contains dynamic member names. + /// + public override IEnumerable GetDynamicMemberNames() + { + foreach (var key in Keys) + yield return key; + } +#endif + } + + /// + /// This class encodes and decodes JSON strings. + /// Spec. details, see http://www.json.org/ + /// + /// JSON uses Arrays and Objects. These correspond here to the datatypes JsonArray(IList<object>) and JsonObject(IDictionary<string,object>). + /// All numbers are parsed to doubles. + /// + [GeneratedCode("simple-json", "1.0.0")] +#if SIMPLE_JSON_INTERNAL + internal +#else + public +#endif + static class PlayFabSimpleJson + { + private enum TokenType : byte + { + NONE = 0, + CURLY_OPEN = 1, + CURLY_CLOSE = 2, + SQUARED_OPEN = 3, + SQUARED_CLOSE = 4, + COLON = 5, + COMMA = 6, + STRING = 7, + NUMBER = 8, + TRUE = 9, + FALSE = 10, + NULL = 11, + } + private const int BUILDER_INIT = 2000; + + private static readonly char[] EscapeTable; + private static readonly char[] EscapeCharacters = new char[] { '"', '\\', '\b', '\f', '\n', '\r', '\t' }; + // private static readonly string EscapeCharactersString = new string(EscapeCharacters); + internal static readonly List NumberTypes = new List { + typeof(bool), typeof(byte), typeof(ushort), typeof(uint), typeof(ulong), typeof(sbyte), typeof(short), typeof(int), typeof(long), typeof(double), typeof(float), typeof(decimal) + }; + + // Performance stuff + [ThreadStatic] + private static StringBuilder _serializeObjectBuilder; + [ThreadStatic] + private static StringBuilder _parseStringBuilder; + + static PlayFabSimpleJson() + { + EscapeTable = new char[93]; + EscapeTable['"'] = '"'; + EscapeTable['\\'] = '\\'; + EscapeTable['\b'] = 'b'; + EscapeTable['\f'] = 'f'; + EscapeTable['\n'] = 'n'; + EscapeTable['\r'] = 'r'; + EscapeTable['\t'] = 't'; + } + + /// + /// Parses the string json into a value + /// + /// A JSON string. + /// An IList<object>, a IDictionary<string,object>, a double, a string, null, true, or false + public static object DeserializeObject(string json) + { + object obj; + if (TryDeserializeObject(json, out obj)) + return obj; + throw new SerializationException("Invalid JSON string"); + } + + /// + /// Try parsing the json string into a value. + /// + /// + /// A JSON string. + /// + /// + /// The object. + /// + /// + /// Returns true if successfull otherwise false. + /// + [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification = "Need to support .NET 2")] + public static bool TryDeserializeObject(string json, out object obj) + { + bool success = true; + if (json != null) + { + char[] charArray = json.ToCharArray(); + int index = 0; + obj = ParseValue(charArray, ref index, ref success); + } + else + obj = null; + + return success; + } + + public static object DeserializeObject(string json, Type type, IJsonSerializerStrategy jsonSerializerStrategy) + { + object jsonObject = DeserializeObject(json); + return type == null || jsonObject != null && ReflectionUtils.IsAssignableFrom(jsonObject.GetType(), type) + ? jsonObject + : (jsonSerializerStrategy ?? CurrentJsonSerializerStrategy).DeserializeObject(jsonObject, type); + } + + public static object DeserializeObject(string json, Type type) + { + return DeserializeObject(json, type, null); + } + + public static T DeserializeObject(string json, IJsonSerializerStrategy jsonSerializerStrategy) + { + return (T)DeserializeObject(json, typeof(T), jsonSerializerStrategy); + } + + public static T DeserializeObject(string json) + { + return (T)DeserializeObject(json, typeof(T), null); + } + + /// + /// Converts a IDictionary<string,object> / IList<object> object into a JSON string + /// + /// A IDictionary<string,object> / IList<object> + /// Serializer strategy to use + /// A JSON encoded string, or null if object 'json' is not serializable + public static string SerializeObject(object json, IJsonSerializerStrategy jsonSerializerStrategy = null) + { + if (_serializeObjectBuilder == null) + _serializeObjectBuilder = new StringBuilder(BUILDER_INIT); + _serializeObjectBuilder.Length = 0; + + if (jsonSerializerStrategy == null) + jsonSerializerStrategy = CurrentJsonSerializerStrategy; + + bool success = SerializeValue(jsonSerializerStrategy, json, _serializeObjectBuilder); + return (success ? _serializeObjectBuilder.ToString() : null); + } + + public static string EscapeToJavascriptString(string jsonString) + { + if (string.IsNullOrEmpty(jsonString)) + return jsonString; + + StringBuilder sb = new StringBuilder(); + char c; + + for (int i = 0; i < jsonString.Length;) + { + c = jsonString[i++]; + + if (c == '\\') + { + int remainingLength = jsonString.Length - i; + if (remainingLength >= 2) + { + char lookahead = jsonString[i]; + if (lookahead == '\\') + { + sb.Append('\\'); + ++i; + } + else if (lookahead == '"') + { + sb.Append("\""); + ++i; + } + else if (lookahead == 't') + { + sb.Append('\t'); + ++i; + } + else if (lookahead == 'b') + { + sb.Append('\b'); + ++i; + } + else if (lookahead == 'n') + { + sb.Append('\n'); + ++i; + } + else if (lookahead == 'r') + { + sb.Append('\r'); + ++i; + } + } + } + else + { + sb.Append(c); + } + } + return sb.ToString(); + } + + static IDictionary ParseObject(char[] json, ref int index, ref bool success) + { + IDictionary table = new JsonObject(); + TokenType token; + + // { + NextToken(json, ref index); + + bool done = false; + while (!done) + { + token = LookAhead(json, index); + if (token == TokenType.NONE) + { + success = false; + return null; + } + else if (token == TokenType.COMMA) + NextToken(json, ref index); + else if (token == TokenType.CURLY_CLOSE) + { + NextToken(json, ref index); + return table; + } + else + { + // name + string name = ParseString(json, ref index, ref success); + if (!success) + { + success = false; + return null; + } + // : + token = NextToken(json, ref index); + if (token != TokenType.COLON) + { + success = false; + return null; + } + // value + object value = ParseValue(json, ref index, ref success); + if (!success) + { + success = false; + return null; + } + table[name] = value; + } + } + return table; + } + + static JsonArray ParseArray(char[] json, ref int index, ref bool success) + { + JsonArray array = new JsonArray(); + + // [ + NextToken(json, ref index); + + bool done = false; + while (!done) + { + TokenType token = LookAhead(json, index); + if (token == TokenType.NONE) + { + success = false; + return null; + } + else if (token == TokenType.COMMA) + NextToken(json, ref index); + else if (token == TokenType.SQUARED_CLOSE) + { + NextToken(json, ref index); + break; + } + else + { + object value = ParseValue(json, ref index, ref success); + if (!success) + return null; + array.Add(value); + } + } + return array; + } + + static object ParseValue(char[] json, ref int index, ref bool success) + { + switch (LookAhead(json, index)) + { + case TokenType.STRING: + return ParseString(json, ref index, ref success); + case TokenType.NUMBER: + return ParseNumber(json, ref index, ref success); + case TokenType.CURLY_OPEN: + return ParseObject(json, ref index, ref success); + case TokenType.SQUARED_OPEN: + return ParseArray(json, ref index, ref success); + case TokenType.TRUE: + NextToken(json, ref index); + return true; + case TokenType.FALSE: + NextToken(json, ref index); + return false; + case TokenType.NULL: + NextToken(json, ref index); + return null; + case TokenType.NONE: + break; + } + success = false; + return null; + } + + static string ParseString(char[] json, ref int index, ref bool success) + { + if (_parseStringBuilder == null) + _parseStringBuilder = new StringBuilder(BUILDER_INIT); + _parseStringBuilder.Length = 0; + + EatWhitespace(json, ref index); + + // " + char c = json[index++]; + bool complete = false; + while (!complete) + { + if (index == json.Length) + break; + + c = json[index++]; + if (c == '"') + { + complete = true; + break; + } + else if (c == '\\') + { + if (index == json.Length) + break; + c = json[index++]; + if (c == '"') + _parseStringBuilder.Append('"'); + else if (c == '\\') + _parseStringBuilder.Append('\\'); + else if (c == '/') + _parseStringBuilder.Append('/'); + else if (c == 'b') + _parseStringBuilder.Append('\b'); + else if (c == 'f') + _parseStringBuilder.Append('\f'); + else if (c == 'n') + _parseStringBuilder.Append('\n'); + else if (c == 'r') + _parseStringBuilder.Append('\r'); + else if (c == 't') + _parseStringBuilder.Append('\t'); + else if (c == 'u') + { + int remainingLength = json.Length - index; + if (remainingLength >= 4) + { + // parse the 32 bit hex into an integer codepoint + uint codePoint; + if (!(success = UInt32.TryParse(new string(json, index, 4), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out codePoint))) + return ""; + + // convert the integer codepoint to a unicode char and add to string + if (0xD800 <= codePoint && codePoint <= 0xDBFF) // if high surrogate + { + index += 4; // skip 4 chars + remainingLength = json.Length - index; + if (remainingLength >= 6) + { + uint lowCodePoint; + if (new string(json, index, 2) == "\\u" && UInt32.TryParse(new string(json, index + 2, 4), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out lowCodePoint)) + { + if (0xDC00 <= lowCodePoint && lowCodePoint <= 0xDFFF) // if low surrogate + { + _parseStringBuilder.Append((char)codePoint); + _parseStringBuilder.Append((char)lowCodePoint); + index += 6; // skip 6 chars + continue; + } + } + } + success = false; // invalid surrogate pair + return ""; + } + _parseStringBuilder.Append(ConvertFromUtf32((int)codePoint)); + // skip 4 chars + index += 4; + } + else + break; + } + } + else + _parseStringBuilder.Append(c); + } + if (!complete) + { + success = false; + return null; + } + return _parseStringBuilder.ToString(); + } + + private static string ConvertFromUtf32(int utf32) + { + // http://www.java2s.com/Open-Source/CSharp/2.6.4-mono-.net-core/System/System/Char.cs.htm + if (utf32 < 0 || utf32 > 0x10FFFF) + throw new ArgumentOutOfRangeException("utf32", "The argument must be from 0 to 0x10FFFF."); + if (0xD800 <= utf32 && utf32 <= 0xDFFF) + throw new ArgumentOutOfRangeException("utf32", "The argument must not be in surrogate pair range."); + if (utf32 < 0x10000) + return new string((char)utf32, 1); + utf32 -= 0x10000; + return new string(new char[] { (char)((utf32 >> 10) + 0xD800), (char)(utf32 % 0x0400 + 0xDC00) }); + } + + static object ParseNumber(char[] json, ref int index, ref bool success) + { + EatWhitespace(json, ref index); + int lastIndex = GetLastIndexOfNumber(json, index); + int charLength = (lastIndex - index) + 1; + object returnNumber; + string str = new string(json, index, charLength); + if (str.IndexOf(".", StringComparison.OrdinalIgnoreCase) != -1 || str.IndexOf("e", StringComparison.OrdinalIgnoreCase) != -1) + { + double number; + success = double.TryParse(new string(json, index, charLength), NumberStyles.Any, CultureInfo.InvariantCulture, out number); + returnNumber = number; + } + else if (str.IndexOf("-", StringComparison.OrdinalIgnoreCase) == -1) + { + ulong number; + success = ulong.TryParse(new string(json, index, charLength), NumberStyles.Any, CultureInfo.InvariantCulture, out number); + returnNumber = number; + } + else + { + long number; + success = long.TryParse(new string(json, index, charLength), NumberStyles.Any, CultureInfo.InvariantCulture, out number); + returnNumber = number; + } + index = lastIndex + 1; + return returnNumber; + } + + static int GetLastIndexOfNumber(char[] json, int index) + { + int lastIndex; + for (lastIndex = index; lastIndex < json.Length; lastIndex++) + if ("0123456789+-.eE".IndexOf(json[lastIndex]) == -1) break; + return lastIndex - 1; + } + + static void EatWhitespace(char[] json, ref int index) + { + for (; index < json.Length; index++) + if (" \t\n\r\b\f".IndexOf(json[index]) == -1) break; + } + + static TokenType LookAhead(char[] json, int index) + { + int saveIndex = index; + return NextToken(json, ref saveIndex); + } + + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + static TokenType NextToken(char[] json, ref int index) + { + EatWhitespace(json, ref index); + if (index == json.Length) + return TokenType.NONE; + char c = json[index]; + index++; + switch (c) + { + case '{': + return TokenType.CURLY_OPEN; + case '}': + return TokenType.CURLY_CLOSE; + case '[': + return TokenType.SQUARED_OPEN; + case ']': + return TokenType.SQUARED_CLOSE; + case ',': + return TokenType.COMMA; + case '"': + return TokenType.STRING; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case '-': + return TokenType.NUMBER; + case ':': + return TokenType.COLON; + } + index--; + int remainingLength = json.Length - index; + // false + if (remainingLength >= 5) + { + if (json[index] == 'f' && json[index + 1] == 'a' && json[index + 2] == 'l' && json[index + 3] == 's' && json[index + 4] == 'e') + { + index += 5; + return TokenType.FALSE; + } + } + // true + if (remainingLength >= 4) + { + if (json[index] == 't' && json[index + 1] == 'r' && json[index + 2] == 'u' && json[index + 3] == 'e') + { + index += 4; + return TokenType.TRUE; + } + } + // null + if (remainingLength >= 4) + { + if (json[index] == 'n' && json[index + 1] == 'u' && json[index + 2] == 'l' && json[index + 3] == 'l') + { + index += 4; + return TokenType.NULL; + } + } + return TokenType.NONE; + } + + static bool SerializeValue(IJsonSerializerStrategy jsonSerializerStrategy, object value, StringBuilder builder) + { + bool success = true; + string stringValue = value as string; + if (value == null) + builder.Append("null"); + else if (stringValue != null) + success = SerializeString(stringValue, builder); + else + { + IDictionary dict = value as IDictionary; + Type type = value.GetType(); + Type[] genArgs = ReflectionUtils.GetGenericTypeArguments(type); +#if NETFX_CORE + var isStringKeyDictionary = type.GetTypeInfo().IsGenericType && type.GetGenericTypeDefinition() == typeof(Dictionary<,>) && genArgs[0] == typeof(string); +#else + var isStringKeyDictionary = type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Dictionary<,>) && genArgs[0] == typeof(string); +#endif + if (isStringKeyDictionary) + { + var strDictValue = value as IDictionary; + success = SerializeObject(jsonSerializerStrategy, strDictValue.Keys, strDictValue.Values, builder); + } + else if (dict != null) + { + success = SerializeObject(jsonSerializerStrategy, dict.Keys, dict.Values, builder); + } + else + { + IDictionary stringDictionary = value as IDictionary; + if (stringDictionary != null) + { + success = SerializeObject(jsonSerializerStrategy, stringDictionary.Keys, stringDictionary.Values, builder); + } + else + { + IEnumerable enumerableValue = value as IEnumerable; + if (enumerableValue != null) + success = SerializeArray(jsonSerializerStrategy, enumerableValue, builder); + else if (IsNumeric(value)) + success = SerializeNumber(value, builder); + else if (value is bool) + builder.Append((bool)value ? "true" : "false"); + else + { + object serializedObject; + success = jsonSerializerStrategy.TrySerializeNonPrimitiveObject(value, out serializedObject); + if (success) + SerializeValue(jsonSerializerStrategy, serializedObject, builder); + } + } + } + } + return success; + } + + static bool SerializeObject(IJsonSerializerStrategy jsonSerializerStrategy, IEnumerable keys, IEnumerable values, StringBuilder builder) + { + builder.Append("{"); + IEnumerator ke = keys.GetEnumerator(); + IEnumerator ve = values.GetEnumerator(); + bool first = true; + while (ke.MoveNext() && ve.MoveNext()) + { + object key = ke.Current; + object value = ve.Current; + if (!first) + builder.Append(","); + string stringKey = key as string; + if (stringKey != null) + SerializeString(stringKey, builder); + else + if (!SerializeValue(jsonSerializerStrategy, value, builder)) return false; + builder.Append(":"); + if (!SerializeValue(jsonSerializerStrategy, value, builder)) + return false; + first = false; + } + builder.Append("}"); + return true; + } + + static bool SerializeArray(IJsonSerializerStrategy jsonSerializerStrategy, IEnumerable anArray, StringBuilder builder) + { + builder.Append("["); + bool first = true; + foreach (object value in anArray) + { + if (!first) + builder.Append(","); + if (!SerializeValue(jsonSerializerStrategy, value, builder)) + return false; + first = false; + } + builder.Append("]"); + return true; + } + + static bool SerializeString(string aString, StringBuilder builder) + { + // Happy path if there's nothing to be escaped. IndexOfAny is highly optimized (and unmanaged) + if (aString.IndexOfAny(EscapeCharacters) == -1) + { + builder.Append('"'); + builder.Append(aString); + builder.Append('"'); + + return true; + } + + builder.Append('"'); + int safeCharacterCount = 0; + char[] charArray = aString.ToCharArray(); + + for (int i = 0; i < charArray.Length; i++) + { + char c = charArray[i]; + + // Non ascii characters are fine, buffer them up and send them to the builder + // in larger chunks if possible. The escape table is a 1:1 translation table + // with \0 [default(char)] denoting a safe character. + if (c >= EscapeTable.Length || EscapeTable[c] == default(char)) + { + safeCharacterCount++; + } + else + { + if (safeCharacterCount > 0) + { + builder.Append(charArray, i - safeCharacterCount, safeCharacterCount); + safeCharacterCount = 0; + } + + builder.Append('\\'); + builder.Append(EscapeTable[c]); + } + } + + if (safeCharacterCount > 0) + { + builder.Append(charArray, charArray.Length - safeCharacterCount, safeCharacterCount); + } + + builder.Append('"'); + return true; + } + + static bool SerializeNumber(object number, StringBuilder builder) + { + if (number is decimal) + builder.Append(((decimal)number).ToString("R", CultureInfo.InvariantCulture)); + else if (number is double) + builder.Append(((double)number).ToString("R", CultureInfo.InvariantCulture)); + else if (number is float) + builder.Append(((float)number).ToString("R", CultureInfo.InvariantCulture)); + else if (NumberTypes.IndexOf(number.GetType()) != -1) + builder.Append(number); + return true; + } + + /// + /// Determines if a given object is numeric in any way + /// (can be integer, double, null, etc). + /// + static bool IsNumeric(object value) + { + if (value is sbyte) return true; + if (value is byte) return true; + if (value is short) return true; + if (value is ushort) return true; + if (value is int) return true; + if (value is uint) return true; + if (value is long) return true; + if (value is ulong) return true; + if (value is float) return true; + if (value is double) return true; + if (value is decimal) return true; + return false; + } + + private static IJsonSerializerStrategy _currentJsonSerializerStrategy; + public static IJsonSerializerStrategy CurrentJsonSerializerStrategy + { + get + { + return _currentJsonSerializerStrategy ?? + (_currentJsonSerializerStrategy = +#if SIMPLE_JSON_DATACONTRACT + DataContractJsonSerializerStrategy +#else + PocoJsonSerializerStrategy +#endif +); + } + set + { + _currentJsonSerializerStrategy = value; + } + } + + private static PocoJsonSerializerStrategy _pocoJsonSerializerStrategy; + [EditorBrowsable(EditorBrowsableState.Advanced)] + public static PocoJsonSerializerStrategy PocoJsonSerializerStrategy + { + get + { + return _pocoJsonSerializerStrategy ?? (_pocoJsonSerializerStrategy = new PocoJsonSerializerStrategy()); + } + } + +#if SIMPLE_JSON_DATACONTRACT + + private static DataContractJsonSerializerStrategy _dataContractJsonSerializerStrategy; + [System.ComponentModel.EditorBrowsable(EditorBrowsableState.Advanced)] + public static DataContractJsonSerializerStrategy DataContractJsonSerializerStrategy + { + get + { + return _dataContractJsonSerializerStrategy ?? (_dataContractJsonSerializerStrategy = new DataContractJsonSerializerStrategy()); + } + } + +#endif + } + + [GeneratedCode("simple-json", "1.0.0")] +#if SIMPLE_JSON_INTERNAL + internal +#else + public +#endif + interface IJsonSerializerStrategy + { + [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification = "Need to support .NET 2")] + bool TrySerializeNonPrimitiveObject(object input, out object output); + object DeserializeObject(object value, Type type); + } + + [GeneratedCode("simple-json", "1.0.0")] +#if SIMPLE_JSON_INTERNAL + internal +#else + public +#endif + class PocoJsonSerializerStrategy : IJsonSerializerStrategy + { + internal IDictionary ConstructorCache; + internal IDictionary> GetCache; + internal IDictionary>> SetCache; + + internal static readonly Type[] EmptyTypes = new Type[0]; + internal static readonly Type[] ArrayConstructorParameterTypes = new Type[] { typeof(int) }; + + private static readonly string[] Iso8601Format = new string[] + { + @"yyyy-MM-dd\THH:mm:ss.FFFFFFF\Z", + @"yyyy-MM-dd\THH:mm:ss\Z", + @"yyyy-MM-dd\THH:mm:ssK" + }; + + public PocoJsonSerializerStrategy() + { + ConstructorCache = new ReflectionUtils.ThreadSafeDictionary(ContructorDelegateFactory); + GetCache = new ReflectionUtils.ThreadSafeDictionary>(GetterValueFactory); + SetCache = new ReflectionUtils.ThreadSafeDictionary>>(SetterValueFactory); + } + + protected virtual string MapClrMemberNameToJsonFieldName(string clrPropertyName) + { + return clrPropertyName; + } + + internal virtual ReflectionUtils.ConstructorDelegate ContructorDelegateFactory(Type key) + { + return ReflectionUtils.GetContructor(key, key.IsArray ? ArrayConstructorParameterTypes : EmptyTypes); + } + + internal virtual IDictionary GetterValueFactory(Type type) + { + IDictionary result = new Dictionary(); + foreach (PropertyInfo propertyInfo in ReflectionUtils.GetProperties(type)) + { + if (propertyInfo.CanRead) + { + MethodInfo getMethod = ReflectionUtils.GetGetterMethodInfo(propertyInfo); + if (getMethod.IsStatic || !getMethod.IsPublic) + continue; + result[MapClrMemberNameToJsonFieldName(propertyInfo.Name)] = ReflectionUtils.GetGetMethod(propertyInfo); + } + } + foreach (FieldInfo fieldInfo in ReflectionUtils.GetFields(type)) + { + if (fieldInfo.IsStatic || !fieldInfo.IsPublic) + continue; + result[MapClrMemberNameToJsonFieldName(fieldInfo.Name)] = ReflectionUtils.GetGetMethod(fieldInfo); + } + return result; + } + + internal virtual IDictionary> SetterValueFactory(Type type) + { + IDictionary> result = new Dictionary>(); + foreach (PropertyInfo propertyInfo in ReflectionUtils.GetProperties(type)) + { + if (propertyInfo.CanWrite) + { + MethodInfo setMethod = ReflectionUtils.GetSetterMethodInfo(propertyInfo); + if (setMethod.IsStatic || !setMethod.IsPublic) + continue; + result[MapClrMemberNameToJsonFieldName(propertyInfo.Name)] = new KeyValuePair(propertyInfo.PropertyType, ReflectionUtils.GetSetMethod(propertyInfo)); + } + } + foreach (FieldInfo fieldInfo in ReflectionUtils.GetFields(type)) + { + if (fieldInfo.IsInitOnly || fieldInfo.IsStatic || !fieldInfo.IsPublic) + continue; + result[MapClrMemberNameToJsonFieldName(fieldInfo.Name)] = new KeyValuePair(fieldInfo.FieldType, ReflectionUtils.GetSetMethod(fieldInfo)); + } + return result; + } + + public virtual bool TrySerializeNonPrimitiveObject(object input, out object output) + { + return TrySerializeKnownTypes(input, out output) || TrySerializeUnknownTypes(input, out output); + } + + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual object DeserializeObject(object value, Type type) + { + if (type == null) throw new ArgumentNullException("type"); + string str = value as string; + + if (type == typeof(Guid) && string.IsNullOrEmpty(str)) + return default(Guid); + + if (value == null) + return null; + + object obj = null; + + if (str != null) + { + if (str.Length != 0) // We know it can't be null now. + { + if (type == typeof(DateTime) || (ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(DateTime))) + return DateTime.ParseExact(str, Iso8601Format, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal | DateTimeStyles.AdjustToUniversal); + if (type == typeof(DateTimeOffset) || (ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(DateTimeOffset))) + return DateTimeOffset.ParseExact(str, Iso8601Format, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal | DateTimeStyles.AdjustToUniversal); + if (type == typeof(Guid) || (ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(Guid))) + return new Guid(str); + if (type == typeof(Uri)) + { + bool isValid = Uri.IsWellFormedUriString(str, UriKind.RelativeOrAbsolute); + + Uri result; + if (isValid && Uri.TryCreate(str, UriKind.RelativeOrAbsolute, out result)) + return result; + + return null; + } + + if (type == typeof(string)) + return str; + + return Convert.ChangeType(str, type, CultureInfo.InvariantCulture); + } + else + { + if (type == typeof(Guid)) + obj = default(Guid); + else if (ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(Guid)) + obj = null; + else + obj = str; + } + // Empty string case + if (!ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(Guid)) + return str; + } + else if (value is bool) + return value; + + bool valueIsLong = value is long; + bool valueIsUlong = value is ulong; + bool valueIsDouble = value is double; + Type nullableType = Nullable.GetUnderlyingType(type); + if (nullableType != null && PlayFabSimpleJson.NumberTypes.IndexOf(nullableType) != -1) + type = nullableType; // Just use the regular type for the conversion + bool isNumberType = PlayFabSimpleJson.NumberTypes.IndexOf(type) != -1; +#if NETFX_CORE + bool isEnumType = type.GetTypeInfo().IsEnum; +#else + bool isEnumType = type.IsEnum; //type.GetType; +#endif + if ((valueIsLong && type == typeof(long)) || (valueIsUlong && type == typeof(ulong)) || (valueIsDouble && type == typeof(double))) + return value; + if ((valueIsLong || valueIsUlong || valueIsDouble) && isEnumType) + return Enum.ToObject(type, Convert.ChangeType(value, Enum.GetUnderlyingType(type), CultureInfo.InvariantCulture)); + if ((valueIsLong || valueIsUlong || valueIsDouble) && isNumberType) + return Convert.ChangeType(value, type, CultureInfo.InvariantCulture); + + IDictionary objects = value as IDictionary; + if (objects != null) + { + IDictionary jsonObject = objects; + + if (ReflectionUtils.IsTypeDictionary(type)) + { + // if dictionary then + Type[] types = ReflectionUtils.GetGenericTypeArguments(type); + Type keyType = types[0]; + Type valueType = types[1]; + + Type genericType = typeof(Dictionary<,>).MakeGenericType(keyType, valueType); + + IDictionary dict = (IDictionary)ConstructorCache[genericType](); + + foreach (KeyValuePair kvp in jsonObject) + dict.Add(kvp.Key, DeserializeObject(kvp.Value, valueType)); + + obj = dict; + } + else + { + if (type == typeof(object)) + obj = value; + else + { + obj = ConstructorCache[type](); + foreach (KeyValuePair> setter in SetCache[type]) + { + object jsonValue; + if (jsonObject.TryGetValue(setter.Key, out jsonValue)) + { + jsonValue = DeserializeObject(jsonValue, setter.Value.Key); + setter.Value.Value(obj, jsonValue); + } + } + } + } + } + else + { + IList valueAsList = value as IList; + if (valueAsList != null) + { + IList jsonObject = valueAsList; + IList list = null; + + if (type.IsArray) + { + list = (IList)ConstructorCache[type](jsonObject.Count); + int i = 0; + foreach (object o in jsonObject) + list[i++] = DeserializeObject(o, type.GetElementType()); + } + else if (ReflectionUtils.IsTypeGenericeCollectionInterface(type) || ReflectionUtils.IsAssignableFrom(typeof(IList), type)) + { + Type innerType = ReflectionUtils.GetGenericListElementType(type); + list = (IList)(ConstructorCache[type] ?? ConstructorCache[typeof(List<>).MakeGenericType(innerType)])(); + foreach (object o in jsonObject) + list.Add(DeserializeObject(o, innerType)); + } + obj = list; + } + return obj; + } + if (ReflectionUtils.IsNullableType(type)) + return ReflectionUtils.ToNullableType(obj, type); + return obj; + } + + protected virtual object SerializeEnum(Enum p) + { + return Convert.ToDouble(p, CultureInfo.InvariantCulture); + } + + [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification = "Need to support .NET 2")] + protected virtual bool TrySerializeKnownTypes(object input, out object output) + { + bool returnValue = true; + if (input is DateTime) + output = ((DateTime)input).ToUniversalTime().ToString(Iso8601Format[0], CultureInfo.InvariantCulture); + else if (input is DateTimeOffset) + output = ((DateTimeOffset)input).ToUniversalTime().ToString(Iso8601Format[0], CultureInfo.InvariantCulture); + else if (input is Guid) + output = ((Guid)input).ToString("D"); + else if (input is Uri) + output = input.ToString(); + else + { + Enum inputEnum = input as Enum; + if (inputEnum != null) + output = SerializeEnum(inputEnum); + else + { + returnValue = false; + output = null; + } + } + return returnValue; + } + [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification = "Need to support .NET 2")] + protected virtual bool TrySerializeUnknownTypes(object input, out object output) + { + if (input == null) throw new ArgumentNullException("input"); + output = null; + Type type = input.GetType(); + if (type.FullName == null) + return false; + IDictionary obj = new JsonObject(); + IDictionary getters = GetCache[type]; + foreach (KeyValuePair getter in getters) + { + if (getter.Value != null) + obj.Add(MapClrMemberNameToJsonFieldName(getter.Key), getter.Value(input)); + } + output = obj; + return true; + } + } + +#if SIMPLE_JSON_DATACONTRACT + [GeneratedCode("simple-json", "1.0.0")] +#if SIMPLE_JSON_INTERNAL + internal +#else + public +#endif + class DataContractJsonSerializerStrategy : PocoJsonSerializerStrategy + { + public DataContractJsonSerializerStrategy() + { + GetCache = new ReflectionUtils.ThreadSafeDictionary>(GetterValueFactory); + SetCache = new ReflectionUtils.ThreadSafeDictionary>>(SetterValueFactory); + } + + internal override IDictionary GetterValueFactory(Type type) + { + bool hasDataContract = ReflectionUtils.GetAttribute(type, typeof(DataContractAttribute)) != null; + if (!hasDataContract) + return base.GetterValueFactory(type); + string jsonKey; + IDictionary result = new Dictionary(); + foreach (PropertyInfo propertyInfo in ReflectionUtils.GetProperties(type)) + { + if (propertyInfo.CanRead) + { + MethodInfo getMethod = ReflectionUtils.GetGetterMethodInfo(propertyInfo); + if (!getMethod.IsStatic && CanAdd(propertyInfo, out jsonKey)) + result[jsonKey] = ReflectionUtils.GetGetMethod(propertyInfo); + } + } + foreach (FieldInfo fieldInfo in ReflectionUtils.GetFields(type)) + { + if (!fieldInfo.IsStatic && CanAdd(fieldInfo, out jsonKey)) + result[jsonKey] = ReflectionUtils.GetGetMethod(fieldInfo); + } + return result; + } + + internal override IDictionary> SetterValueFactory(Type type) + { + bool hasDataContract = ReflectionUtils.GetAttribute(type, typeof(DataContractAttribute)) != null; + if (!hasDataContract) + return base.SetterValueFactory(type); + string jsonKey; + IDictionary> result = new Dictionary>(); + foreach (PropertyInfo propertyInfo in ReflectionUtils.GetProperties(type)) + { + if (propertyInfo.CanWrite) + { + MethodInfo setMethod = ReflectionUtils.GetSetterMethodInfo(propertyInfo); + if (!setMethod.IsStatic && CanAdd(propertyInfo, out jsonKey)) + result[jsonKey] = new KeyValuePair(propertyInfo.PropertyType, ReflectionUtils.GetSetMethod(propertyInfo)); + } + } + foreach (FieldInfo fieldInfo in ReflectionUtils.GetFields(type)) + { + if (!fieldInfo.IsInitOnly && !fieldInfo.IsStatic && CanAdd(fieldInfo, out jsonKey)) + result[jsonKey] = new KeyValuePair(fieldInfo.FieldType, ReflectionUtils.GetSetMethod(fieldInfo)); + } + // todo implement sorting for DATACONTRACT. + return result; + } + + private static bool CanAdd(MemberInfo info, out string jsonKey) + { + jsonKey = null; + if (ReflectionUtils.GetAttribute(info, typeof(IgnoreDataMemberAttribute)) != null) + return false; + DataMemberAttribute dataMemberAttribute = (DataMemberAttribute)ReflectionUtils.GetAttribute(info, typeof(DataMemberAttribute)); + if (dataMemberAttribute == null) + return false; + jsonKey = string.IsNullOrEmpty(dataMemberAttribute.Name) ? info.Name : dataMemberAttribute.Name; + return true; + } + } + +#endif + + // This class is meant to be copied into other libraries. So we want to exclude it from Code Analysis rules + // that might be in place in the target project. + [GeneratedCode("reflection-utils", "1.0.0")] +#if SIMPLE_JSON_REFLECTION_UTILS_PUBLIC + public +#else + internal +#endif + class ReflectionUtils + { + private static readonly object[] EmptyObjects = new object[0]; + + public delegate object GetDelegate(object source); + public delegate void SetDelegate(object source, object value); + public delegate object ConstructorDelegate(params object[] args); + + public delegate TValue ThreadSafeDictionaryValueFactory(TKey key); + + [ThreadStatic] + private static object[] _1ObjArray; + +#if SIMPLE_JSON_TYPEINFO + public static TypeInfo GetTypeInfo(Type type) + { + return type.GetTypeInfo(); + } +#else + public static Type GetTypeInfo(Type type) + { + return type; + } +#endif + + public static Attribute GetAttribute(MemberInfo info, Type type) + { +#if SIMPLE_JSON_TYPEINFO + if (info == null || type == null || !info.IsDefined(type)) + return null; + return info.GetCustomAttribute(type); +#else + if (info == null || type == null || !Attribute.IsDefined(info, type)) + return null; + return Attribute.GetCustomAttribute(info, type); +#endif + } + + public static Type GetGenericListElementType(Type type) + { + IEnumerable interfaces; +#if SIMPLE_JSON_TYPEINFO + interfaces = type.GetTypeInfo().ImplementedInterfaces; +#else + interfaces = type.GetInterfaces(); +#endif + foreach (Type implementedInterface in interfaces) + { + if (IsTypeGeneric(implementedInterface) && + implementedInterface.GetGenericTypeDefinition() == typeof(IList<>)) + { + return GetGenericTypeArguments(implementedInterface)[0]; + } + } + return GetGenericTypeArguments(type)[0]; + } + + public static Attribute GetAttribute(Type objectType, Type attributeType) + { + +#if SIMPLE_JSON_TYPEINFO + if (objectType == null || attributeType == null || !objectType.GetTypeInfo().IsDefined(attributeType)) + return null; + return objectType.GetTypeInfo().GetCustomAttribute(attributeType); +#else + if (objectType == null || attributeType == null || !Attribute.IsDefined(objectType, attributeType)) + return null; + return Attribute.GetCustomAttribute(objectType, attributeType); +#endif + } + + public static Type[] GetGenericTypeArguments(Type type) + { +#if SIMPLE_JSON_TYPEINFO + return type.GetTypeInfo().GenericTypeArguments; +#else + return type.GetGenericArguments(); +#endif + } + + public static bool IsTypeGeneric(Type type) + { + return GetTypeInfo(type).IsGenericType; + } + + public static bool IsTypeGenericeCollectionInterface(Type type) + { + if (!IsTypeGeneric(type)) + return false; + + Type genericDefinition = type.GetGenericTypeDefinition(); + + return (genericDefinition == typeof(IList<>) + || genericDefinition == typeof(ICollection<>) + || genericDefinition == typeof(IEnumerable<>) +#if SIMPLE_JSON_READONLY_COLLECTIONS + || genericDefinition == typeof(IReadOnlyCollection<>) + || genericDefinition == typeof(IReadOnlyList<>) +#endif +); + } + + public static bool IsAssignableFrom(Type type1, Type type2) + { + return GetTypeInfo(type1).IsAssignableFrom(GetTypeInfo(type2)); + } + + public static bool IsTypeDictionary(Type type) + { +#if SIMPLE_JSON_TYPEINFO + if (typeof(IDictionary<,>).GetTypeInfo().IsAssignableFrom(type.GetTypeInfo())) + return true; +#else + if (typeof(System.Collections.IDictionary).IsAssignableFrom(type)) + return true; +#endif + if (!GetTypeInfo(type).IsGenericType) + return false; + + Type genericDefinition = type.GetGenericTypeDefinition(); + return genericDefinition == typeof(IDictionary<,>); + } + + public static bool IsNullableType(Type type) + { + return GetTypeInfo(type).IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>); + } + + public static object ToNullableType(object obj, Type nullableType) + { + return obj == null ? null : Convert.ChangeType(obj, Nullable.GetUnderlyingType(nullableType), CultureInfo.InvariantCulture); + } + + public static bool IsValueType(Type type) + { + return GetTypeInfo(type).IsValueType; + } + + public static IEnumerable GetConstructors(Type type) + { +#if SIMPLE_JSON_TYPEINFO + return type.GetTypeInfo().DeclaredConstructors; +#else + return type.GetConstructors(); +#endif + } + + public static ConstructorInfo GetConstructorInfo(Type type, params Type[] argsType) + { + IEnumerable constructorInfos = GetConstructors(type); + int i; + bool matches; + foreach (ConstructorInfo constructorInfo in constructorInfos) + { + ParameterInfo[] parameters = constructorInfo.GetParameters(); + if (argsType.Length != parameters.Length) + continue; + + i = 0; + matches = true; + foreach (ParameterInfo parameterInfo in constructorInfo.GetParameters()) + { + if (parameterInfo.ParameterType != argsType[i]) + { + matches = false; + break; + } + } + + if (matches) + return constructorInfo; + } + + return null; + } + + public static IEnumerable GetProperties(Type type) + { +#if SIMPLE_JSON_TYPEINFO + return type.GetRuntimeProperties(); +#else + return type.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); +#endif + } + + public static IEnumerable GetFields(Type type) + { +#if SIMPLE_JSON_TYPEINFO + return type.GetRuntimeFields(); +#else + return type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); +#endif + } + + public static MethodInfo GetGetterMethodInfo(PropertyInfo propertyInfo) + { +#if SIMPLE_JSON_TYPEINFO + return propertyInfo.GetMethod; +#else + return propertyInfo.GetGetMethod(true); +#endif + } + + public static MethodInfo GetSetterMethodInfo(PropertyInfo propertyInfo) + { +#if SIMPLE_JSON_TYPEINFO + return propertyInfo.SetMethod; +#else + return propertyInfo.GetSetMethod(true); +#endif + } + + public static ConstructorDelegate GetContructor(ConstructorInfo constructorInfo) + { + return GetConstructorByReflection(constructorInfo); + } + + public static ConstructorDelegate GetContructor(Type type, params Type[] argsType) + { + return GetConstructorByReflection(type, argsType); + } + + public static ConstructorDelegate GetConstructorByReflection(ConstructorInfo constructorInfo) + { + return delegate (object[] args) + { + var x = constructorInfo; + return x.Invoke(args); + }; + } + + public static ConstructorDelegate GetConstructorByReflection(Type type, params Type[] argsType) + { + ConstructorInfo constructorInfo = GetConstructorInfo(type, argsType); + return constructorInfo == null ? null : GetConstructorByReflection(constructorInfo); + } + + public static GetDelegate GetGetMethod(PropertyInfo propertyInfo) + { + return GetGetMethodByReflection(propertyInfo); + } + + public static GetDelegate GetGetMethod(FieldInfo fieldInfo) + { + return GetGetMethodByReflection(fieldInfo); + } + + public static GetDelegate GetGetMethodByReflection(PropertyInfo propertyInfo) + { + MethodInfo methodInfo = GetGetterMethodInfo(propertyInfo); + return delegate (object source) { return methodInfo.Invoke(source, EmptyObjects); }; + } + + public static GetDelegate GetGetMethodByReflection(FieldInfo fieldInfo) + { + return delegate (object source) { return fieldInfo.GetValue(source); }; + } + + public static SetDelegate GetSetMethod(PropertyInfo propertyInfo) + { + return GetSetMethodByReflection(propertyInfo); + } + + public static SetDelegate GetSetMethod(FieldInfo fieldInfo) + { + return GetSetMethodByReflection(fieldInfo); + } + + public static SetDelegate GetSetMethodByReflection(PropertyInfo propertyInfo) + { + MethodInfo methodInfo = GetSetterMethodInfo(propertyInfo); + return delegate (object source, object value) + { + if (_1ObjArray == null) + _1ObjArray = new object[1]; + _1ObjArray[0] = value; + methodInfo.Invoke(source, _1ObjArray); + }; + } + + public static SetDelegate GetSetMethodByReflection(FieldInfo fieldInfo) + { + return delegate (object source, object value) { fieldInfo.SetValue(source, value); }; + } + + public sealed class ThreadSafeDictionary : IDictionary + { + private readonly object _lock = new object(); + private readonly ThreadSafeDictionaryValueFactory _valueFactory; + private Dictionary _dictionary; + + public ThreadSafeDictionary(ThreadSafeDictionaryValueFactory valueFactory) + { + _valueFactory = valueFactory; + } + + private TValue Get(TKey key) + { + if (_dictionary == null) + return AddValue(key); + TValue value; + if (!_dictionary.TryGetValue(key, out value)) + return AddValue(key); + return value; + } + + private TValue AddValue(TKey key) + { + TValue value = _valueFactory(key); + lock (_lock) + { + if (_dictionary == null) + { + _dictionary = new Dictionary(); + _dictionary[key] = value; + } + else + { + TValue val; + if (_dictionary.TryGetValue(key, out val)) + return val; + Dictionary dict = new Dictionary(_dictionary); + dict[key] = value; + _dictionary = dict; + } + } + return value; + } + + public void Add(TKey key, TValue value) + { + throw new NotImplementedException(); + } + + public bool ContainsKey(TKey key) + { + return _dictionary.ContainsKey(key); + } + + public ICollection Keys + { + get { return _dictionary.Keys; } + } + + public bool Remove(TKey key) + { + throw new NotImplementedException(); + } + + public bool TryGetValue(TKey key, out TValue value) + { + value = this[key]; + return true; + } + + public ICollection Values + { + get { return _dictionary.Values; } + } + + public TValue this[TKey key] + { + get { return Get(key); } + set { throw new NotImplementedException(); } + } + + public void Add(KeyValuePair item) + { + throw new NotImplementedException(); + } + + public void Clear() + { + throw new NotImplementedException(); + } + + public bool Contains(KeyValuePair item) + { + throw new NotImplementedException(); + } + + public void CopyTo(KeyValuePair[] array, int arrayIndex) + { + throw new NotImplementedException(); + } + + public int Count + { + get { return _dictionary.Count; } + } + + public bool IsReadOnly + { + get { throw new NotImplementedException(); } + } + + public bool Remove(KeyValuePair item) + { + throw new NotImplementedException(); + } + + public IEnumerator> GetEnumerator() + { + return _dictionary.GetEnumerator(); + } + + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return _dictionary.GetEnumerator(); + } + } + } +} + +// ReSharper restore LoopCanBeConvertedToQuery +// ReSharper restore RedundantExplicitArrayCreation +// ReSharper restore SuggestUseVarKeywordEvident diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/SimpleJson.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/SimpleJson.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..83a076913ceaba7ab5f38cb84ccc7764a7060851 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/SimpleJson.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0f0d14c9d506300479e2ab23ae3af45f +timeCreated: 1466707367 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils.meta index 664d9603a706322595d58797bfae0ca1d82a6305..e8597d752ef4746d35570b194f88d3088fdca999 100644 --- a/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils.meta +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils.meta @@ -1,3 +1,9 @@ -fileFormatVersion: 2 -guid: 209fe4b4a18a4f0a8757011b79d00368 -timeCreated: 1628803762 \ No newline at end of file +fileFormatVersion: 2 +guid: 71cec03dd8d77ee489008fa915e3b3a2 +folderAsset: yes +timeCreated: 1466715484 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/EditorCoroutine.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/EditorCoroutine.cs new file mode 100644 index 0000000000000000000000000000000000000000..0a0324b1fd8da102bf5275a444985ce641e8bedb --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/EditorCoroutine.cs @@ -0,0 +1,144 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; +using UnityEngine.Networking; + +namespace PlayFab.PfEditor +{ + public class EditorCoroutine + { + public string Id; + public class EditorWaitForSeconds : YieldInstruction + { + public float Seconds; + + public EditorWaitForSeconds(float seconds) + { + this.Seconds = seconds; + } + } + + private SortedList shouldRunAfterTimes = new SortedList(); + private const float _tick = .02f; + + public static EditorCoroutine Start(IEnumerator _routine) + { + var coroutine = new EditorCoroutine(_routine); + coroutine.Id = Guid.NewGuid().ToString(); + coroutine.Start(); + return coroutine; + } + +#if UNITY_2018_2_OR_NEWER + public static EditorCoroutine Start(IEnumerator _routine, UnityWebRequest www) + { + var coroutine = new EditorCoroutine(_routine); + coroutine.Id = Guid.NewGuid().ToString(); + coroutine._www = www; + coroutine.Start(); + return coroutine; + } +#else + public static EditorCoroutine Start(IEnumerator _routine, WWW www) + { + var coroutine = new EditorCoroutine(_routine); + coroutine.Id = Guid.NewGuid().ToString(); + coroutine._www = www; + coroutine.Start(); + return coroutine; + } +#endif + + + readonly IEnumerator routine; + + +#if UNITY_2018_2_OR_NEWER + private UnityWebRequest _www; + private bool _sent = false; +#else + private WWW _www; +#endif + + EditorCoroutine(IEnumerator _routine) + { + routine = _routine; + } + + void Start() + { + EditorApplication.update += Update; + } + private void Stop() + { + EditorApplication.update -= Update; + } + + private float _timeCounter = 0; + void Update() + { + _timeCounter += _tick; + //Debug.LogFormat("ID:{0} TimeCounter:{1}", this.Id, _timeCounter); + + try + { + if (_www != null) + { +#if UNITY_2018_2_OR_NEWER + if (!_sent) + { + try + { + routine.MoveNext(); + _sent = true; + } + catch (ArgumentNullException) + { + } + } +#endif + + if (_www.isDone && !routine.MoveNext()) + { + Stop(); + } + } + else + { + var seconds = routine.Current as EditorWaitForSeconds; + if (seconds != null) + { + var wait = seconds; + shouldRunAfterTimes.Add(_timeCounter + wait.Seconds, routine); + } + else if (!routine.MoveNext()) + { + Stop(); + } + } + + var shouldRun = shouldRunAfterTimes; + var index = 0; + foreach (var runAfterSeconds in shouldRun) + { + if (_timeCounter >= runAfterSeconds.Key) + { + //Debug.LogFormat("RunAfterSeconds: {0} >= {1}", runAfterSeconds.Key, _timeCounter); + shouldRunAfterTimes.RemoveAt(index); + if (!runAfterSeconds.Value.MoveNext()) + { + Stop(); + } + } + index++; + } + } + catch (Exception ex) + { + Debug.LogException(ex); + } + } + } +} diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/EditorCoroutine.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/EditorCoroutine.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..224da8969158f91e2d08eeb99158e149d3166971 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/EditorCoroutine.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4bfb5aeb6a8516445b2f97249ab88f62 +timeCreated: 1466530674 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorDataService.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorDataService.cs new file mode 100644 index 0000000000000000000000000000000000000000..a2b735092ef9d51e55bddd820d724c9f4039be44 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorDataService.cs @@ -0,0 +1,209 @@ +using PlayFab.PfEditor.EditorModels; +using PlayFab.PfEditor.Json; +using System.Collections.Generic; +using System.Reflection; +using UnityEditor; +using UnityEngine; + +namespace PlayFab.PfEditor +{ + [InitializeOnLoad] + public class PlayFabEditorDataService : UnityEditor.Editor + { + #region EditorPref data classes + public class PlayFab_SharedSettingsProxy + { + private readonly Dictionary _settingProps = new Dictionary(); + private readonly string[] expectedProps = new[] { "titleid", "developersecretkey", "requesttype", "compressapidata", "requestkeepalive", "requesttimeout" }; + + public string TitleId { get { return Get("titleid"); } set { Set("titleid", value); } } + public string DeveloperSecretKey { get { return Get("developersecretkey"); } set { Set("developersecretkey", value); } } + public PlayFabEditorSettings.WebRequestType WebRequestType { get { return Get("requesttype"); } set { Set("requesttype", (int)value); } } + public bool CompressApiData { get { return Get("compressapidata"); } set { Set("compressapidata", value); } } + public bool KeepAlive { get { return Get("requestkeepalive"); } set { Set("requestkeepalive", value); } } + public int TimeOut { get { return Get("requesttimeout"); } set { Set("requesttimeout", value); } } + + public PlayFab_SharedSettingsProxy() + { + LoadProps(); + } + + private PropertyInfo LoadProps(string name = null) + { + var playFabSettingsType = PlayFabEditorSDKTools.GetPlayFabSettings(); + if (playFabSettingsType == null) + return null; + + if (string.IsNullOrEmpty(name)) + { + for (var i = 0; i < expectedProps.Length; i++) + LoadProps(expectedProps[i]); + return null; + } + else + { + var eachProperty = playFabSettingsType.GetProperty(name, BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.Static); + if (eachProperty != null) + _settingProps[name.ToLowerInvariant()] = eachProperty; + return eachProperty; + } + } + + private T Get(string name) + { + PropertyInfo propInfo; + var success = _settingProps.TryGetValue(name.ToLowerInvariant(), out propInfo); + T output = !success ? default(T) : (T)propInfo.GetValue(null, null); + return output; + } + + private void Set(string name, T value) + { + PropertyInfo propInfo; + if (!_settingProps.TryGetValue(name.ToLowerInvariant(), out propInfo)) + propInfo = LoadProps(name); + if (propInfo != null) + propInfo.SetValue(null, value, null); + else + Debug.LogWarning("Could not save " + name + " because PlayFabSettings could not be found."); + } + } + #endregion EditorPref data classes + + public static PlayFab_SharedSettingsProxy SharedSettings = new PlayFab_SharedSettingsProxy(); + + private static string KeyPrefix + { + get + { + var dataPath = Application.dataPath; + var lastIndex = dataPath.LastIndexOf('/'); + var secondToLastIndex = dataPath.LastIndexOf('/', lastIndex - 1); + return dataPath.Substring(secondToLastIndex, lastIndex - secondToLastIndex); + } + } + + public static bool IsDataLoaded = false; + + public static Title ActiveTitle + { + get + { + if (PlayFabEditorPrefsSO.Instance.StudioList != null && PlayFabEditorPrefsSO.Instance.StudioList.Count > 0) + { + if (string.IsNullOrEmpty(PlayFabEditorPrefsSO.Instance.SelectedStudio) || PlayFabEditorPrefsSO.Instance.SelectedStudio == PlayFabEditorHelper.STUDIO_OVERRIDE) + return new Title { Id = SharedSettings.TitleId, SecretKey = SharedSettings.DeveloperSecretKey, GameManagerUrl = PlayFabEditorHelper.GAMEMANAGER_URL }; + + if (string.IsNullOrEmpty(PlayFabEditorPrefsSO.Instance.SelectedStudio) || string.IsNullOrEmpty(SharedSettings.TitleId)) + return null; + + int studioIndex; int titleIndex; + if (DoesTitleExistInStudios(SharedSettings.TitleId, out studioIndex, out titleIndex)) + return PlayFabEditorPrefsSO.Instance.StudioList[studioIndex].Titles[titleIndex]; + } + return null; + } + } + + public static void SaveEnvDetails(bool updateToScriptableObj = true) + { + UpdateScriptableObject(); + } + + private static TResult LoadFromEditorPrefs(string key) where TResult : class, new() + { + if (!EditorPrefs.HasKey(KeyPrefix + key)) + return new TResult(); + + var serialized = EditorPrefs.GetString(KeyPrefix + key); + var result = JsonWrapper.DeserializeObject(serialized); + if (result != null) + return JsonWrapper.DeserializeObject(serialized); + return new TResult(); + } + + private static void UpdateScriptableObject() + { + var playfabSettingsType = PlayFabEditorSDKTools.GetPlayFabSettings(); + if (playfabSettingsType == null || !PlayFabEditorSDKTools.IsInstalled || !PlayFabEditorSDKTools.isSdkSupported) + return; + + var props = playfabSettingsType.GetProperties(); + foreach (var property in props) + { + switch (property.Name.ToLowerInvariant()) + { + case "productionenvironmenturl": + property.SetValue(null, PlayFabEditorHelper.TITLE_ENDPOINT, null); break; + } + } + + var getSoMethod = playfabSettingsType.GetMethod("GetSharedSettingsObjectPrivate", BindingFlags.NonPublic | BindingFlags.Static); + if (getSoMethod != null) + { + var so = getSoMethod.Invoke(null, new object[0]) as ScriptableObject; + if (so != null) + EditorUtility.SetDirty(so); + } + PlayFabEditorPrefsSO.Save(); + AssetDatabase.SaveAssets(); + } + + public static bool DoesTitleExistInStudios(string searchFor) //out Studio studio + { + if (PlayFabEditorPrefsSO.Instance.StudioList == null) + return false; + searchFor = searchFor.ToLower(); + foreach (var studio in PlayFabEditorPrefsSO.Instance.StudioList) + if (studio.Titles != null) + foreach (var title in studio.Titles) + if (title.Id.ToLower() == searchFor) + return true; + return false; + } + + private static bool DoesTitleExistInStudios(string searchFor, out int studioIndex, out int titleIndex) //out Studio studio + { + studioIndex = 0; // corresponds to our _OVERRIDE_ + titleIndex = -1; + + if (PlayFabEditorPrefsSO.Instance.StudioList == null) + return false; + + for (var studioIdx = 0; studioIdx < PlayFabEditorPrefsSO.Instance.StudioList.Count; studioIdx++) + { + for (var titleIdx = 0; titleIdx < PlayFabEditorPrefsSO.Instance.StudioList[studioIdx].Titles.Length; titleIdx++) + { + if (PlayFabEditorPrefsSO.Instance.StudioList[studioIdx].Titles[titleIdx].Id.ToLower() == searchFor.ToLower()) + { + studioIndex = studioIdx; + titleIndex = titleIdx; + return true; + } + } + } + + return false; + } + + public static void RefreshStudiosList(bool onlyIfNull = false) + { + if (string.IsNullOrEmpty(PlayFabEditorPrefsSO.Instance.DevAccountToken)) + return; // Can't load studios when not logged in + if (onlyIfNull && PlayFabEditorPrefsSO.Instance.StudioList != null) + return; // Don't spam load this, only load it the first time + + if (PlayFabEditorPrefsSO.Instance.StudioList != null) + PlayFabEditorPrefsSO.Instance.StudioList.Clear(); + PlayFabEditorApi.GetStudios(new GetStudiosRequest(), (getStudioResult) => + { + if (PlayFabEditorPrefsSO.Instance.StudioList == null) + PlayFabEditorPrefsSO.Instance.StudioList = new List(); + foreach (var eachStudio in getStudioResult.Studios) + PlayFabEditorPrefsSO.Instance.StudioList.Add(eachStudio); + PlayFabEditorPrefsSO.Instance.StudioList.Add(Studio.OVERRIDE); + PlayFabEditorPrefsSO.Save(); + }, PlayFabEditorHelper.SharedErrorCallback); + } + } +} diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorDataService.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorDataService.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..e237b3e24f626c0bcd81f72106a47e8870cae8ea --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorDataService.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c4c398f1711644e79aae821d377e572e +timeCreated: 1470851203 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorHelper.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorHelper.cs new file mode 100644 index 0000000000000000000000000000000000000000..59556bef7ad73a8efbb2d59c327cc54b6c283f96 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorHelper.cs @@ -0,0 +1,223 @@ +using UnityEditor; +using UnityEngine; +using System; +using System.Collections.Generic; +using System.IO; +using PlayFab.PfEditor.Json; + +namespace PlayFab.PfEditor +{ + [InitializeOnLoad] + public static partial class PlayFabEditorHelper + { + #region EDITOR_STRINGS + public static string EDEX_VERSION_TEMPLATE = "namespace PlayFab.PfEditor { public static partial class PlayFabEditorHelper { public static string EDEX_VERSION = \"{sdkVersion}\"; } }\n"; + public static string EDEX_NAME = "PlayFab_EditorExtensions"; + public static string EDEX_ROOT = Application.dataPath + "/PlayFabEditorExtensions/Editor"; + public static string DEV_API_ENDPOINT = "https://editor.playfabapi.com"; + public static string TITLE_ENDPOINT = ".playfabapi.com"; + public static string GAMEMANAGER_URL = "https://developer.playfab.com"; + public static string PLAYFAB_SETTINGS_TYPENAME = "PlayFabSettings"; + public static string PLAYFAB_EDEX_MAINFILE = "PlayFabEditor.cs"; + public static string SDK_DOWNLOAD_PATH = "/Resources/PlayFabUnitySdk.unitypackage"; + public static string EDEX_UPGRADE_PATH = "/Resources/PlayFabUnityEditorExtensions.unitypackage"; + public static string EDEX_PACKAGES_PATH = "/Resources/MostRecentPackage.unitypackage"; + + public static string CLOUDSCRIPT_FILENAME = ".CloudScript.js"; //prefixed with a '.' to exclude this code from Unity's compiler + public static string CLOUDSCRIPT_PATH = EDEX_ROOT + "/Resources/" + CLOUDSCRIPT_FILENAME; + + public static string ADMIN_API = "ENABLE_PLAYFABADMIN_API"; + public static string CLIENT_API = "DISABLE_PLAYFABCLIENT_API"; + public static string ENTITY_API = "DISABLE_PLAYFABENTITY_API"; + public static string SERVER_API = "ENABLE_PLAYFABSERVER_API"; + public static string DEBUG_REQUEST_TIMING = "PLAYFAB_REQUEST_TIMING"; + public static string ENABLE_PLAYFABPLAYSTREAM_API = "ENABLE_PLAYFABPLAYSTREAM_API"; + public static string ENABLE_BETA_FETURES = "ENABLE_PLAYFAB_BETA"; + public static string ENABLE_PLAYFABPUBSUB_API = "ENABLE_PLAYFABPUBSUB_API"; + public static Dictionary FLAG_LABELS = new Dictionary { + { ADMIN_API, new PfDefineFlag { Flag = ADMIN_API, Label = "ENABLE ADMIN API", Category = PfDefineFlag.FlagCategory.Api, isInverted = false, isSafe = true } }, + { CLIENT_API, new PfDefineFlag { Flag = CLIENT_API, Label = "ENABLE CLIENT API", Category = PfDefineFlag.FlagCategory.Api, isInverted = true, isSafe = true } }, + { ENTITY_API, new PfDefineFlag { Flag = ENTITY_API, Label = "ENABLE ENTITY API", Category = PfDefineFlag.FlagCategory.Api, isInverted = true, isSafe = true } }, + { SERVER_API, new PfDefineFlag { Flag = SERVER_API, Label = "ENABLE SERVER API", Category = PfDefineFlag.FlagCategory.Api, isInverted = false, isSafe = true } }, + + { DEBUG_REQUEST_TIMING, new PfDefineFlag { Flag = DEBUG_REQUEST_TIMING, Label = "ENABLE REQUEST TIMES", Category = PfDefineFlag.FlagCategory.Feature, isInverted = false, isSafe = true } }, + { ENABLE_BETA_FETURES, new PfDefineFlag { Flag = ENABLE_BETA_FETURES, Label = "ENABLE UNSTABLE FEATURES", Category = PfDefineFlag.FlagCategory.Feature, isInverted = false, isSafe = true } }, + { ENABLE_PLAYFABPUBSUB_API, new PfDefineFlag { Flag = ENABLE_PLAYFABPUBSUB_API, Label = "ENABLE PubSub", Category = PfDefineFlag.FlagCategory.Feature, isInverted = false, isSafe = false } }, + }; + + public static string DEFAULT_SDK_LOCATION = "Assets/PlayFabSdk"; + public static string STUDIO_OVERRIDE = "_OVERRIDE_"; + + public static string MSG_SPIN_BLOCK = "{\"useSpinner\":true, \"blockUi\":true }"; + #endregion + + private static GUISkin _uiStyle; + public static GUISkin uiStyle + { + get + { + if (_uiStyle != null) + return _uiStyle; + _uiStyle = GetUiStyle(); + return _uiStyle; + } + } + + static PlayFabEditorHelper() + { + // scan for changes to the editor folder / structure. + if (uiStyle == null) + { + string[] rootFiles = new string[0]; + bool relocatedEdEx = false; + _uiStyle = null; + + try + { + if (!string.IsNullOrEmpty(PlayFabEditorPrefsSO.Instance.EdExPath)) + EDEX_ROOT = PlayFabEditorPrefsSO.Instance.EdExPath; + rootFiles = Directory.GetDirectories(EDEX_ROOT); + } + catch + { + + if (rootFiles.Length == 0) + { + // this probably means the editor folder was moved. + // see if we can locate the moved root and reload the assets + + var movedRootFiles = Directory.GetFiles(Application.dataPath, PLAYFAB_EDEX_MAINFILE, SearchOption.AllDirectories); + if (movedRootFiles.Length > 0) + { + relocatedEdEx = true; + EDEX_ROOT = movedRootFiles[0].Substring(0, movedRootFiles[0].LastIndexOf(PLAYFAB_EDEX_MAINFILE) - 1); + PlayFabEditorPrefsSO.Instance.EdExPath = EDEX_ROOT; + PlayFabEditorDataService.SaveEnvDetails(); + } + } + } + finally + { + if (relocatedEdEx && rootFiles.Length == 0) + { + Debug.Log("Found new EdEx root: " + EDEX_ROOT); + } + else if (rootFiles.Length == 0) + { + Debug.Log("Could not relocate the PlayFab Editor Extension"); + EDEX_ROOT = string.Empty; + } + } + } + } + + private static GUISkin GetUiStyle() + { + var searchRootAssetFolder = Application.dataPath; + var pfGuiPaths = Directory.GetFiles(searchRootAssetFolder, "PlayFabStyles.guiskin", SearchOption.AllDirectories); + foreach (var eachPath in pfGuiPaths) + { + var loadPath = eachPath.Substring(eachPath.LastIndexOf("Assets")); + return (GUISkin)AssetDatabase.LoadAssetAtPath(loadPath, typeof(GUISkin)); + } + return null; + } + + public static void SharedErrorCallback(EditorModels.PlayFabError error) + { + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnError, error.GenerateErrorReport()); + } + + public static void SharedErrorCallback(string error) + { + PlayFabEditor.RaiseStateUpdate(PlayFabEditor.EdExStates.OnError, "SharedErrorCallback" + error); + } + + public static EditorModels.PlayFabError GeneratePlayFabError(string json, object customData = null) + { + JsonObject errorDict = null; + Dictionary> errorDetails = null; + try + { + //deserialize the error + errorDict = JsonWrapper.DeserializeObject(json, PlayFabEditorUtil.ApiSerializerStrategy); + + + if (errorDict.ContainsKey("errorDetails")) + { + var ed = JsonWrapper.DeserializeObject>>(errorDict["errorDetails"].ToString()); + errorDetails = ed; + } + } + catch (Exception e) + { + return new EditorModels.PlayFabError() + { + ErrorMessage = e.Message + }; + } + + //create new error object + return new EditorModels.PlayFabError + { + HttpCode = errorDict.ContainsKey("code") ? Convert.ToInt32(errorDict["code"]) : 400, + HttpStatus = errorDict.ContainsKey("status") + ? (string)errorDict["status"] + : "BadRequest", + Error = errorDict.ContainsKey("errorCode") + ? (EditorModels.PlayFabErrorCode)Convert.ToInt32(errorDict["errorCode"]) + : EditorModels.PlayFabErrorCode.ServiceUnavailable, + ErrorMessage = errorDict.ContainsKey("errorMessage") + ? (string)errorDict["errorMessage"] + : string.Empty, + ErrorDetails = errorDetails, + CustomData = customData ?? new object() + }; + } + + #region unused, but could be useful + + /// + /// Tool to create a color background texture + /// + /// + /// + /// + /// Texture2D + public static Texture2D MakeTex(int width, int height, Color col) + { + var pix = new Color[width * height]; + + for (var i = 0; i < pix.Length; i++) + pix[i] = col; + + var result = new Texture2D(width, height); + result.SetPixels(pix); + result.Apply(); + + return result; + } + + public static Vector3 GetColorVector(int colorValue) + { + return new Vector3((colorValue / 255f), (colorValue / 255f), (colorValue / 255f)); + } + #endregion + } + + public class PfDefineFlag + { + public enum FlagCategory + { + Api, + Feature, + Other, + } + + public string Flag; // Also doubles as the dictionary key + public string Label; + public FlagCategory Category; + public bool isInverted; + public bool isSafe; + } +} diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorHelper.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorHelper.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..98bf0b4026cbeb92da4446e229d571d8197f804c --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorHelper.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b7a0580bf951d2f46861fe4785bf74f6 +timeCreated: 1465794484 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorPrefsSO.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorPrefsSO.cs new file mode 100644 index 0000000000000000000000000000000000000000..4ae22c6191bf24c529ed78ad942a8555e412e946 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorPrefsSO.cs @@ -0,0 +1,77 @@ +using PlayFab.PfEditor.EditorModels; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; +using System; +using System.IO; + +namespace PlayFab.PfEditor +{ +#if UNITY_5_3_OR_NEWER + [CreateAssetMenu(fileName = "PlayFabEditorPrefsSO", menuName = "PlayFab/Make Prefs SO", order = 1)] +#endif + public class PlayFabEditorPrefsSO : ScriptableObject + { + private static PlayFabEditorPrefsSO _instance; + public static PlayFabEditorPrefsSO Instance + { + get + { + if (_instance != null) + return _instance; + + var settingsList = Resources.LoadAll("PlayFabEditorPrefsSO"); + if (settingsList.Length == 1) + _instance = settingsList[0]; + if (_instance != null) + return _instance; + + _instance = CreateInstance(); + if (!Directory.Exists(Path.Combine(Application.dataPath, "PlayFabEditorExtensions/Editor/Resources"))) + Directory.CreateDirectory(Path.Combine(Application.dataPath, "PlayFabEditorExtensions/Editor/Resources")); + + // TODO: we know the location of this file will be under PlayFabEditorExtensions/Editor/ + // just need to pull that files path, and append /Resrouces/ and boom you have the below path. + // consider moving this above the if directory exists so we can do the same logic beforehand. + Directory.GetFiles(Application.dataPath, "PlayFabEditor.cs"); + + AssetDatabase.CreateAsset(_instance, "Assets/PlayFabEditorExtensions/Editor/Resources/PlayFabEditorPrefsSO.asset"); + AssetDatabase.SaveAssets(); + Debug.LogWarning("Created missing PlayFabEditorPrefsSO file"); + return _instance; + } + } + + public static void Save() + { + EditorUtility.SetDirty(_instance); + AssetDatabase.SaveAssets(); + } + + public string DevAccountEmail; + public string DevAccountToken; + + public List StudioList = null; // Null means not fetched, empty is a possible return result from GetStudios + public string SelectedStudio; + + public readonly Dictionary TitleDataCache = new Dictionary(); + public readonly Dictionary InternalTitleDataCache = new Dictionary(); + + public string SdkPath; + public string EdExPath; + public string LocalCloudScriptPath; + + private string _latestSdkVersion; + private string _latestEdExVersion; + private DateTime _lastSdkVersionCheck; + private DateTime _lastEdExVersionCheck; + public bool PanelIsShown; + public string EdSet_latestSdkVersion { get { return _latestSdkVersion; } set { _latestSdkVersion = value; _lastSdkVersionCheck = DateTime.UtcNow; } } + public string EdSet_latestEdExVersion { get { return _latestEdExVersion; } set { _latestEdExVersion = value; _lastEdExVersionCheck = DateTime.UtcNow; } } + public DateTime EdSet_lastSdkVersionCheck { get { return _lastSdkVersionCheck; } } + public DateTime EdSet_lastEdExVersionCheck { get { return _lastEdExVersionCheck; } } + + public int curMainMenuIdx; + public int curSubMenuIdx; + } +} diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorPrefsSO.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorPrefsSO.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..63be678d8e7c3afd0a3ff0a1397dc8fb35321976 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorPrefsSO.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5d0199c11aa6f514784c5c69cd8378d8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorUtils.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorUtils.cs new file mode 100644 index 0000000000000000000000000000000000000000..90e41d5c3db3e98231eea829e89b716053ac3cac --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorUtils.cs @@ -0,0 +1,118 @@ +using PlayFab.PfEditor.Json; +using System; +using System.Globalization; + +namespace PlayFab.PfEditor +{ + internal static class PlayFabEditorUtil + { + public static readonly string[] _defaultDateTimeFormats = new string[]{ // All parseable ISO 8601 formats for DateTime.[Try]ParseExact - Lets us deserialize any legacy timestamps in one of these formats + // These are the standard format with ISO 8601 UTC markers (T/Z) + "yyyy-MM-ddTHH:mm:ss.FFFFFFZ", + "yyyy-MM-ddTHH:mm:ss.FFFFZ", + "yyyy-MM-ddTHH:mm:ss.FFFZ", // DEFAULT_UTC_OUTPUT_INDEX + "yyyy-MM-ddTHH:mm:ss.FFZ", + "yyyy-MM-ddTHH:mm:ssZ", + + // These are the standard format without ISO 8601 UTC markers (T/Z) + "yyyy-MM-dd HH:mm:ss.FFFFFF", + "yyyy-MM-dd HH:mm:ss.FFFF", + "yyyy-MM-dd HH:mm:ss.FFF", + "yyyy-MM-dd HH:mm:ss.FF", // DEFAULT_LOCAL_OUTPUT_INDEX + "yyyy-MM-dd HH:mm:ss", + + // These are the result of an input bug, which we now have to support as long as the db has entries formatted like this + "yyyy-MM-dd HH:mm.ss.FFFF", + "yyyy-MM-dd HH:mm.ss.FFF", + "yyyy-MM-dd HH:mm.ss.FF", + "yyyy-MM-dd HH:mm.ss", + }; + + public const int DEFAULT_UTC_OUTPUT_INDEX = 2; // The default format everybody should use + public const int DEFAULT_LOCAL_OUTPUT_INDEX = 8; // The default format if you want to use local time (This doesn't have universal support in all PlayFab code) + private static DateTimeStyles _dateTimeStyles = DateTimeStyles.RoundtripKind; + + public static string timeStamp + { + get { return DateTime.Now.ToString(_defaultDateTimeFormats[DEFAULT_LOCAL_OUTPUT_INDEX]); } + } + + + public static string utcTimeStamp + { + get { return DateTime.UtcNow.ToString(_defaultDateTimeFormats[DEFAULT_UTC_OUTPUT_INDEX]); } + } + + public static string Format(string text, params object[] args) + { + return args.Length > 0 ? string.Format(text, args) : text; + } + + public static MyJsonSerializerStrategy ApiSerializerStrategy = new MyJsonSerializerStrategy(); + public class MyJsonSerializerStrategy : PocoJsonSerializerStrategy + { + /// + /// Convert the json value into the destination field/property + /// + public override object DeserializeObject(object value, Type type) + { + string valueStr = value as string; + if (valueStr == null) // For all of our custom conversions, value is a string + return base.DeserializeObject(value, type); + + Type underType = Nullable.GetUnderlyingType(type); + if (underType != null) + return DeserializeObject(value, underType); +#if NETFX_CORE + else if (type.GetTypeInfo().IsEnum) +#else + else if (type.IsEnum) +#endif + return Enum.Parse(type, (string)value, true); + else if (type == typeof(DateTime)) + { + DateTime output; + bool result = DateTime.TryParseExact(valueStr, _defaultDateTimeFormats, CultureInfo.CurrentCulture, _dateTimeStyles, out output); + if (result) + return output; + } + else if (type == typeof(DateTimeOffset)) + { + DateTimeOffset output; + bool result = DateTimeOffset.TryParseExact(valueStr, _defaultDateTimeFormats, CultureInfo.CurrentCulture, _dateTimeStyles, out output); + if (result) + return output; + } + return base.DeserializeObject(value, type); + } + + /// + /// Set output to a string that represents the input object + /// + protected override bool TrySerializeKnownTypes(object input, out object output) + { +#if NETFX_CORE + if (input.GetType().GetTypeInfo().IsEnum) +#else + if (input.GetType().IsEnum) +#endif + { + output = input.ToString(); + return true; + } + else if (input is DateTime) + { + output = ((DateTime)input).ToString(_defaultDateTimeFormats[DEFAULT_UTC_OUTPUT_INDEX], CultureInfo.CurrentCulture); + return true; + } + else if (input is DateTimeOffset) + { + output = ((DateTimeOffset)input).ToString(_defaultDateTimeFormats[DEFAULT_UTC_OUTPUT_INDEX], CultureInfo.CurrentCulture); + return true; + } + return base.TrySerializeKnownTypes(input, out output); + } + } + + } +} diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorUtils.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorUtils.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..ee8468a1d00b318e4392f9d483b6d1ef6897ccbd --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorUtils.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b422838f8121dc44ca79ceeea8582a50 +timeCreated: 1466715484 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorVersion.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorVersion.cs new file mode 100644 index 0000000000000000000000000000000000000000..54f3b776b2b3e0ea81845e84d796d18439a7529f --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorVersion.cs @@ -0,0 +1 @@ +namespace PlayFab.PfEditor { public static partial class PlayFabEditorHelper { public static string EDEX_VERSION = "2.67.190520"; } } diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorVersion.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorVersion.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..5d858a8fbeb37c30e35dd2440d94cdef0a65960f --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorVersion.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 24ef2cb033a5dfd4588226fe1447bf5a +timeCreated: 1465794484 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabGuiFieldHelper.cs b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabGuiFieldHelper.cs new file mode 100644 index 0000000000000000000000000000000000000000..ac7bb2186ddc69ee32dd95ed56c2cd320ddde1af --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabGuiFieldHelper.cs @@ -0,0 +1,149 @@ +using System; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +namespace PlayFab.PfEditor +{ + public static class PlayFabGuiFieldHelper + { + private static int IndexOf(string[] elements, string element) + { + if (elements == null) + return -1; + for (var i = 0; i < elements.Length; i++) + if (elements[i].Equals(element)) + return i; + return -1; + } + + /// + /// Build a dropdown menu from a list of arbitrary elements. + /// + public static void SuperFancyDropdown(float labelWidth, string label, T activeElement, IList elements, Func getElementKey, Action OnChangeTo, GUIStyle style, params GUILayoutOption[] options) + { + if (elements == null || elements.Count == 0) + return; // Nothing to show + + string[] namesList = new string[elements.Count]; + for (var i = 0; i < elements.Count; i++) + namesList[i] = getElementKey(elements[i]); + + using (new UnityHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear"))) + { + EditorGUILayout.LabelField(label, PlayFabEditorHelper.uiStyle.GetStyle("labelStyle"), GUILayout.Width(labelWidth)); + var prevIndex = IndexOf(namesList, getElementKey(activeElement)); + var newIndex = EditorGUILayout.Popup(prevIndex, namesList, PlayFabEditorHelper.uiStyle.GetStyle("TextField"), GUILayout.MinHeight(25)); + if (newIndex != prevIndex) + OnChangeTo(elements[newIndex]); + } + } + } + + /// + /// A disposable wrapper for enabled/disabled which sets it to one way or another and restores when finished + /// + public class UnityGuiToggler : IDisposable + { + private bool previous; + + public UnityGuiToggler(bool isEnabled = false) + { + previous = GUI.enabled; + GUI.enabled = isEnabled; + } + + public void Dispose() + { + GUI.enabled = previous; + } + } + + /// + /// A disposable wrapper for Verticals, to ensure they're paired properly, and to make the code visually block together within them + /// + public class UnityHorizontal : IDisposable + { + public UnityHorizontal(params GUILayoutOption[] options) + { + EditorGUILayout.BeginHorizontal(options); + } + + public UnityHorizontal(GUIStyle style, params GUILayoutOption[] options) + { + EditorGUILayout.BeginHorizontal(style, options); + } + + public void Dispose() + { + EditorGUILayout.EndHorizontal(); + } + } + + /// + /// A disposable wrapper for Horizontals, to ensure they're paired properly, and to make the code visually block together within them + /// + public class UnityVertical : IDisposable + { + public UnityVertical(params GUILayoutOption[] options) + { + EditorGUILayout.BeginVertical(options); + } + + public UnityVertical(GUIStyle style, params GUILayoutOption[] options) + { + EditorGUILayout.BeginVertical(style, options); + } + + public void Dispose() + { + EditorGUILayout.EndVertical(); + } + } + + //FixedWidthLabel class. Extends IDisposable, so that it can be used with the "using" keyword. + public class FixedWidthLabel : IDisposable + { + private readonly ZeroIndent indentReset; //helper class to reset and restore indentation + public float fieldWidth = 0; + + public FixedWidthLabel(GUIContent label, GUIStyle style) // constructor. + { + //state changes are applied here. + + this.fieldWidth = style.CalcSize(label).x + 9 * EditorGUI.indentLevel; + EditorGUILayout.BeginHorizontal(PlayFabEditorHelper.uiStyle.GetStyle("gpStyleClear")); // create a new horizontal group + EditorGUILayout.LabelField(label, style, GUILayout.Width(fieldWidth)); + // indentation from the left side. It's 9 pixels per indent level + + indentReset = new ZeroIndent(); //helper class to have no indentation after the label + } + + public FixedWidthLabel(string label) + : this(new GUIContent(label), PlayFabEditorHelper.uiStyle.GetStyle("labelStyle")) //alternative constructor, if we don't want to deal with GUIContents + { + } + + public void Dispose() //restore GUI state + { + indentReset.Dispose(); //restore indentation + EditorGUILayout.EndHorizontal(); //finish horizontal group + } + } + + class ZeroIndent : IDisposable //helper class to clear indentation + { + private readonly int originalIndent; //the original indentation value before we change the GUI state + + public ZeroIndent() + { + originalIndent = EditorGUI.indentLevel; //save original indentation + EditorGUI.indentLevel = 0; //clear indentation + } + + public void Dispose() + { + EditorGUI.indentLevel = originalIndent; //restore original indentation + } + } +} diff --git a/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabGuiFieldHelper.cs.meta b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabGuiFieldHelper.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..116dfd459a79f7034825a299dfef12fba787836f --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabGuiFieldHelper.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 286b8f4cdeaad154ea11e3bca31b955f +timeCreated: 1465870728 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI.meta b/Assets/PlayFabEditorExtensions/Editor/UI.meta new file mode 100644 index 0000000000000000000000000000000000000000..c23149c31da4dfbe4b5e36bbaecdbaee2543f673 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a3ba3e0b8bdd64d44b530b3ba1d603e0 +folderAsset: yes +timeCreated: 1469033493 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Fonts.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Fonts.meta new file mode 100644 index 0000000000000000000000000000000000000000..fd3625775ee53ea68a219ab92696bb8b6b6012e1 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Fonts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 93b8e49ffe6415343be5de01de7c23c1 +folderAsset: yes +timeCreated: 1465800950 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Fonts/Avalon Bold.ttf b/Assets/PlayFabEditorExtensions/Editor/UI/Fonts/Avalon Bold.ttf new file mode 100644 index 0000000000000000000000000000000000000000..70cfe31d521228b780f5d889f2991f6d4d756653 Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Fonts/Avalon Bold.ttf differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Fonts/Avalon Bold.ttf.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Fonts/Avalon Bold.ttf.meta new file mode 100644 index 0000000000000000000000000000000000000000..b92f5ae2a843f12c51c50d7f4dae14399c80aa9f --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Fonts/Avalon Bold.ttf.meta @@ -0,0 +1,19 @@ +fileFormatVersion: 2 +guid: 96e17474f840a01459f0cc936c5d4d9b +timeCreated: 1465800940 +licenseType: Pro +TrueTypeFontImporter: + serializedVersion: 3 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + ascentCalculationMode: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Fonts/Avalon.ttf b/Assets/PlayFabEditorExtensions/Editor/UI/Fonts/Avalon.ttf new file mode 100644 index 0000000000000000000000000000000000000000..a5e767b9e85b4169cf3a242d2f786172b912743d Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Fonts/Avalon.ttf differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Fonts/Avalon.ttf.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Fonts/Avalon.ttf.meta new file mode 100644 index 0000000000000000000000000000000000000000..1316245cbee9fcdaff099c0b9f995f733aa550b1 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Fonts/Avalon.ttf.meta @@ -0,0 +1,19 @@ +fileFormatVersion: 2 +guid: 436664d726292a54fa79d2168f4541ac +timeCreated: 1465800973 +licenseType: Pro +TrueTypeFontImporter: + serializedVersion: 3 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + ascentCalculationMode: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images.meta new file mode 100644 index 0000000000000000000000000000000000000000..8af8ba0ace117cfcc50c3c666e72dd6c2575c30a --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bcd1f2f077e925c418ed3eac3526988c +folderAsset: yes +timeCreated: 1465796980 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/Black.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Black.png new file mode 100644 index 0000000000000000000000000000000000000000..2c14419c259eebc1c68924523b2fd6c487c8af40 Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Black.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/Black.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Black.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..7b3929bfada011f6a0d9ed4dc6c5252587e92bd7 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Black.png.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: 66d3ceb5fa86d498891e23dd5303a8f7 +timeCreated: 1468018889 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 0 + mipBias: -1 + wrapMode: 0 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 0.001 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: [] + spriteSheet: + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/Clear.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Clear.png new file mode 100644 index 0000000000000000000000000000000000000000..7dfa3aa6c9462ef89fbf159e6470e45a99517a7e Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Clear.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/Clear.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Clear.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..778b4df7f5835a72e08af3565746e2ea71788d80 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Clear.png.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: d03222342209e43daaf2ca8d1364e47a +timeCreated: 1468018889 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 0 + mipBias: -1 + wrapMode: 0 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 0.001 + alphaIsTransparency: 1 + textureType: 0 + buildTargetSettings: [] + spriteSheet: + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_base.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_base.png new file mode 100644 index 0000000000000000000000000000000000000000..b32e7a45a234f8393c9775b757de504f7cfddc06 Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_base.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_base.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_base.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..6e6058fa22752d245f236f6c0f48b00d183d7136 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_base.png.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: 9427eaf0703a74a008e9f9353562df39 +timeCreated: 1468018889 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 0 + mipBias: -1 + wrapMode: 0 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 0.001 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: [] + spriteSheet: + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_dk1.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_dk1.png new file mode 100644 index 0000000000000000000000000000000000000000..3f54b0df2fbf36219fd11c97ee08a3862880e8f4 Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_dk1.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_dk1.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_dk1.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..53e9a3bd11468051200d3d0c97e4f8c6d7284e0c --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_dk1.png.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: 1c8aa345bd7fe44b88cf00b2f6b82579 +timeCreated: 1468018889 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 0 + mipBias: -1 + wrapMode: 0 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 0.001 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: [] + spriteSheet: + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_lt1.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_lt1.png new file mode 100644 index 0000000000000000000000000000000000000000..eff3d42d5769e65dbcaff472804ea55199dc54a9 Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_lt1.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_lt1.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_lt1.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..7c83a6de5544033b67f49544de60af2cf20b665c --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_lt1.png.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: 2e064f0948b52496983fa0597fa61a0a +timeCreated: 1468018889 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 0 + mipBias: -1 + wrapMode: 0 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 0.001 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: [] + spriteSheet: + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_lt2.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_lt2.png new file mode 100644 index 0000000000000000000000000000000000000000..7c99ec6ab3ffb19001cdc9dcefe9cbc9ba84d4d3 Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_lt2.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_lt2.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_lt2.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..c3e378e1360a16a31d24fa00a84f297494f7d604 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Gray_lt2.png.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: 14a4e823a9ef94dc18a71decc8453380 +timeCreated: 1468018889 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 0 + mipBias: -1 + wrapMode: 0 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 0.001 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: [] + spriteSheet: + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/Orange.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Orange.png new file mode 100644 index 0000000000000000000000000000000000000000..a7ea8c5b8a620fed39730ec25dfa628b5ea71e2e Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Orange.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/Orange.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Orange.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..211ad8929f6e8f7fe04be9fc073ae4eb4e56a92b --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Orange.png.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: 83fd25cf40b81429ca784df9d37d32ba +timeCreated: 1468018889 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 0 + mipBias: -1 + wrapMode: 0 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 0.001 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: [] + spriteSheet: + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/Square.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Square.png new file mode 100644 index 0000000000000000000000000000000000000000..8eb1b1ecc13b6e1d2375151866134cd7a040340c Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Square.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/Square.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Square.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..2381ac5c432a5c420a049341db47ca6f53c2b2ff --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/Square.png.meta @@ -0,0 +1,61 @@ +fileFormatVersion: 2 +guid: 1f9be0de996bb4832a474ecd28c9f0fc +timeCreated: 1468016831 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 0 + mipBias: 0 + wrapMode: 0 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 0.001 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: [] + spriteSheet: + sprites: [] + outline: + - - {x: 0, y: 0} + - {x: 0, y: 4} + - {x: 4, y: 4} + - {x: 4, y: 0} + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/White.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/White.png new file mode 100644 index 0000000000000000000000000000000000000000..068c0bd85e503874578259ac44ab581d19cadbd9 Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/White.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/White.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/White.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..f10c123f388960c230eac9b2e690a73215d196ff --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/White.png.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: 5f32aedbadeff4790a54248a66f0b89d +timeCreated: 1468018889 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 0 + mipBias: -1 + wrapMode: 0 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 0.001 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: [] + spriteSheet: + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/checkmark.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/checkmark.png new file mode 100644 index 0000000000000000000000000000000000000000..de1c72b6fb124cdb2519c08f31599bf5ee57e262 Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/checkmark.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/checkmark.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/checkmark.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..b32639aa06f7557bf1b996db32f260510f93a85c --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/checkmark.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 1f806a850e4ff264eafc4935f65793b8 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/checkmark_off.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/checkmark_off.png new file mode 100644 index 0000000000000000000000000000000000000000..55b2bf9f60965001f362ff4bea5fbb4775de7cf4 Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/checkmark_off.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/checkmark_off.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/checkmark_off.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..a045f640df572f0f6fbd78bfea556fc28b3a121f --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/checkmark_off.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: d20c53c8cad21024091aeed0b9bf2a0e +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/checkmark_on.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/checkmark_on.png new file mode 100644 index 0000000000000000000000000000000000000000..a53beb629d205ca3103c6687a94ab9e743e1d7f9 Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/checkmark_on.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/checkmark_on.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/checkmark_on.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..d2bb2ce1f5dc645ebb4e62c7677d8344cfb19b84 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/checkmark_on.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: a2f13c216f2649d49b892cade7f4e5f0 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/dashboardIcon.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/dashboardIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..6cbb6c2a1c2e0a748b309b8b9ea7f2af0817f0bc Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/dashboardIcon.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/dashboardIcon.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/dashboardIcon.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..42d6cc60c0c260ffbc7eeb016227d8f01430c955 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/dashboardIcon.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 4f1db872b2efa324c806fcbb54e19e1c +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/dashboardIconHover.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/dashboardIconHover.png new file mode 100644 index 0000000000000000000000000000000000000000..070261ff39f4cb2542460509ab2ce783f0f45eb5 Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/dashboardIconHover.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/dashboardIconHover.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/dashboardIconHover.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..64d51d5a7ef1b0125bab99387190acbacd9dab92 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/dashboardIconHover.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: b43817ee9dda16c41a628a705526a021 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/dn_colored.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/dn_colored.png new file mode 100644 index 0000000000000000000000000000000000000000..0722053691a64f96c24746b5438e57a3694beae4 Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/dn_colored.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/dn_colored.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/dn_colored.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..9dc795e0532cc264e1ad7fb11f8fce0b910bd82b --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/dn_colored.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: d396473974f984567a8e398f1ebd9ec9 +timeCreated: 1472083701 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/dn_gray.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/dn_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..a89ecdc1a133b8070b736b896a8d02a02e9fbf08 Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/dn_gray.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/dn_gray.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/dn_gray.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..d1feecaf4d109cfe71b4d26739c0835f3a603032 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/dn_gray.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 677a55eab8f234e688ec4c6be70208bb +timeCreated: 1472083701 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/green.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/green.png new file mode 100644 index 0000000000000000000000000000000000000000..8bc4ecbab1895e0a9b72722756d5e4220cbc556f Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/green.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/green.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/green.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..0fc544df2d80219d9b314f15396102f057bbdeb6 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/green.png.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: f30842e29e3a14ecea9b07a2e8f04c55 +timeCreated: 1470788290 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 64 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/pfFullLogo_O.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/pfFullLogo_O.png new file mode 100644 index 0000000000000000000000000000000000000000..c88c5f9990f6d7d0fe7f64ffb7f22b71024ef5fc Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/pfFullLogo_O.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/pfFullLogo_O.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/pfFullLogo_O.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..598213b6f688eee82acd100011a0836fa2a44226 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/pfFullLogo_O.png.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: 597788bebb59e4cec8318947e1a3da3e +timeCreated: 1468254721 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 512 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/pfFullLogo_W.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/pfFullLogo_W.png new file mode 100644 index 0000000000000000000000000000000000000000..e72685fbe8abdd90a58f45df2c50e4b666a313c2 Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/pfFullLogo_W.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/pfFullLogo_W.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/pfFullLogo_W.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..beca62d30bc4dc298743e255c0587d61d96b298d --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/pfFullLogo_W.png.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: b108cf8dccf424419ad69d9354b1d234 +timeCreated: 1468254716 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 512 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/playfablogo.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/playfablogo.png new file mode 100644 index 0000000000000000000000000000000000000000..1e8fa8de5fdb19b6f56c2e854bd5dff4f1e4f774 Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/playfablogo.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/playfablogo.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/playfablogo.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..29fb861945b0f3363e671bc4de4e5d31114ab90d --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/playfablogo.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 77e37f7fe73c7db4d9a1702eb4ad411b +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/r_colored.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/r_colored.png new file mode 100644 index 0000000000000000000000000000000000000000..23034255e4e0ee060ab82781e273bfcdd6f8139c Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/r_colored.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/r_colored.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/r_colored.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..bef660370a1739065bc0c78405acf86ea45ad469 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/r_colored.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 93e56b7e753794953939a50df2c9c323 +timeCreated: 1472083701 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/r_gray.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/r_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..a1e433c2c9bf257a26cf89eb8a4182343fccba04 Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/r_gray.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/r_gray.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/r_gray.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..afec6eadb9f73de5ca72921ecd497039cc274bf5 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/r_gray.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 43f13eb24deac4ae5a86c25189272a74 +timeCreated: 1472083701 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/red.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/red.png new file mode 100644 index 0000000000000000000000000000000000000000..59b2be99a023891bd4244697f79761a7d46e5efa Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/red.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/red.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/red.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..43a1aeda6bf2296e508f0f3adc4fe78283741c23 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/red.png.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: ba384a3c945464600a4046641bb57ca3 +timeCreated: 1470788284 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 64 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/yellow.png b/Assets/PlayFabEditorExtensions/Editor/UI/Images/yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..baf1eb3c6a4934924f0e1aec008dec06f6768849 Binary files /dev/null and b/Assets/PlayFabEditorExtensions/Editor/UI/Images/yellow.png differ diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/Images/yellow.png.meta b/Assets/PlayFabEditorExtensions/Editor/UI/Images/yellow.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..f2af5e334b86c18a78d7389f9f254b1ce33e419d --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/Images/yellow.png.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: a50d8da0637a640dda5e2018b972cade +timeCreated: 1470788288 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 64 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/PlayFabStyles.guiskin b/Assets/PlayFabEditorExtensions/Editor/UI/PlayFabStyles.guiskin new file mode 100644 index 0000000000000000000000000000000000000000..2ae981675e03d935838a25d68a827e5f094bfa55 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/PlayFabStyles.guiskin @@ -0,0 +1,3539 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12001, guid: 0000000000000000e000000000000000, type: 0} + m_Name: PlayFabStyles + m_EditorClassIdentifier: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_box: + m_Name: box + m_Normal: + m_Background: {fileID: 11001, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.79999995, g: 0.79999995, b: 0.79999995, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 6 + m_Right: 6 + m_Top: 6 + m_Bottom: 6 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 1 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_button: + m_Name: button + m_Normal: + m_Background: {fileID: 2800000, guid: 83fd25cf40b81429ca784df9d37d32ba, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Hover: + m_Background: {fileID: 2800000, guid: 5f32aedbadeff4790a54248a66f0b89d, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 0.427451, b: 0.12941177, a: 1} + m_Active: + m_Background: {fileID: 2800000, guid: 2e064f0948b52496983fa0597fa61a0a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 0.427451, b: 0.12941177, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnNormal: + m_Background: {fileID: 11005, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.9019608, g: 0.9019608, b: 0.9019608, a: 1} + m_OnHover: + m_Background: {fileID: 11004, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnActive: + m_Background: {fileID: 11002, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.9, g: 0.9, b: 0.9, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 6 + m_Right: 6 + m_Top: 6 + m_Bottom: 4 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 2 + m_Bottom: 4 + m_Padding: + m_Left: 3 + m_Right: 3 + m_Top: 3 + m_Bottom: 3 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 96e17474f840a01459f0cc936c5d4d9b, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_Alignment: 4 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + m_toggle: + m_Name: toggle + m_Normal: + m_Background: {fileID: 2800000, guid: d20c53c8cad21024091aeed0b9bf2a0e, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.89112896, g: 0.89112896, b: 0.89112896, a: 1} + m_Hover: + m_Background: {fileID: 2800000, guid: d20c53c8cad21024091aeed0b9bf2a0e, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Active: + m_Background: {fileID: 2800000, guid: d20c53c8cad21024091aeed0b9bf2a0e, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 2800000, guid: a2f13c216f2649d49b892cade7f4e5f0, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.8901961, g: 0.8901961, b: 0.8901961, a: 1} + m_OnHover: + m_Background: {fileID: 2800000, guid: a2f13c216f2649d49b892cade7f4e5f0, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnActive: + m_Background: {fileID: 2800000, guid: a2f13c216f2649d49b892cade7f4e5f0, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 15 + m_Right: 0 + m_Top: 3 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 20 + m_FixedHeight: 20 + m_StretchWidth: 0 + m_StretchHeight: 0 + m_label: + m_Name: label + m_Normal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.9, g: 0.9, b: 0.9, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 3 + m_Bottom: 3 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 1 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_textField: + m_Name: textfield + m_Normal: + m_Background: {fileID: 2800000, guid: 5f32aedbadeff4790a54248a66f0b89d, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.24264705, g: 0.24264705, b: 0.24264705, a: 1} + m_Hover: + m_Background: {fileID: 2800000, guid: 5f32aedbadeff4790a54248a66f0b89d, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.09411765, g: 0.7058824, b: 0.7607843, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 2800000, guid: 5f32aedbadeff4790a54248a66f0b89d, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 0.427451, b: 0.12941177, a: 1} + m_OnNormal: + m_Background: {fileID: 2800000, guid: 5f32aedbadeff4790a54248a66f0b89d, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 0.427451, b: 0.12941177, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 3 + m_Right: 3 + m_Top: 3 + m_Bottom: 3 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 96e17474f840a01459f0cc936c5d4d9b, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_Alignment: 3 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 1 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_textArea: + m_Name: textarea + m_Normal: + m_Background: {fileID: 2800000, guid: 5f32aedbadeff4790a54248a66f0b89d, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.24264705, g: 0.24264705, b: 0.24264705, a: 1} + m_Hover: + m_Background: {fileID: 2800000, guid: 14a4e823a9ef94dc18a71decc8453380, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 0.5586207, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 11025, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 3 + m_Right: 3 + m_Top: 3 + m_Bottom: 3 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 1 + m_RichText: 0 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_window: + m_Name: window + m_Normal: + m_Background: {fileID: 11023, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 11022, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 8 + m_Right: 8 + m_Top: 18 + m_Bottom: 8 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 10 + m_Right: 10 + m_Top: 20 + m_Bottom: 10 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 1 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: -18} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_horizontalSlider: + m_Name: horizontalslider + m_Normal: + m_Background: {fileID: 11009, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 3 + m_Right: 3 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: -1 + m_Right: -1 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: -2 + m_Bottom: -3 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 12 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_horizontalSliderThumb: + m_Name: horizontalsliderthumb + m_Normal: + m_Background: {fileID: 11011, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 11012, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 11010, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 4 + m_Right: 4 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 7 + m_Right: 7 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: -1 + m_Right: -1 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 12 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_verticalSlider: + m_Name: verticalslider + m_Normal: + m_Background: {fileID: 11021, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 3 + m_Bottom: 3 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: -1 + m_Bottom: -1 + m_Overflow: + m_Left: -2 + m_Right: -3 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 0 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 12 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 1 + m_verticalSliderThumb: + m_Name: verticalsliderthumb + m_Normal: + m_Background: {fileID: 11011, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 11012, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 11010, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 7 + m_Bottom: 7 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: -1 + m_Bottom: -1 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 12 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 1 + m_horizontalScrollbar: + m_Name: horizontalscrollbar + m_Normal: + m_Background: {fileID: 2800000, guid: 1c8aa345bd7fe44b88cf00b2f6b82579, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 9 + m_Right: 9 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 1 + m_Bottom: 4 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 10 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_horizontalScrollbarThumb: + m_Name: horizontalscrollbarthumb + m_Normal: + m_Background: {fileID: 2800000, guid: 9427eaf0703a74a008e9f9353562df39, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 6 + m_Right: 6 + m_Top: 6 + m_Bottom: 6 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 6 + m_Right: 6 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: -1 + m_Bottom: 1 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 8 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_horizontalScrollbarLeftButton: + m_Name: horizontalscrollbarleftbutton + m_Normal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_horizontalScrollbarRightButton: + m_Name: horizontalscrollbarrightbutton + m_Normal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_verticalScrollbar: + m_Name: verticalscrollbar + m_Normal: + m_Background: {fileID: 2800000, guid: 1c8aa345bd7fe44b88cf00b2f6b82579, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 9 + m_Bottom: 9 + m_Margin: + m_Left: 1 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 1 + m_Bottom: 1 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 10 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_verticalScrollbarThumb: + m_Name: verticalscrollbarthumb + m_Normal: + m_Background: {fileID: 2800000, guid: 9427eaf0703a74a008e9f9353562df39, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 6 + m_Right: 6 + m_Top: 6 + m_Bottom: 6 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 6 + m_Bottom: 6 + m_Overflow: + m_Left: -1 + m_Right: -1 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 8 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 1 + m_verticalScrollbarUpButton: + m_Name: verticalscrollbarupbutton + m_Normal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_verticalScrollbarDownButton: + m_Name: verticalscrollbardownbutton + m_Normal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_ScrollView: + m_Name: scrollview + m_Normal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_CustomStyles: + - m_Name: enabledButton + m_Normal: + m_Background: {fileID: 2800000, guid: d03222342209e43daaf2ca8d1364e47a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.58431375, g: 0.6, b: 0.58431375, a: 1} + m_Hover: + m_Background: {fileID: 2800000, guid: d03222342209e43daaf2ca8d1364e47a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.09411765, g: 0.7058824, b: 0.7607843, a: 1} + m_Active: + m_Background: {fileID: 2800000, guid: d03222342209e43daaf2ca8d1364e47a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.09411765, g: 0.7058824, b: 0.7607843, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 5 + m_Bottom: 5 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 96e17474f840a01459f0cc936c5d4d9b, type: 3} + m_FontSize: 11 + m_FontStyle: 0 + m_Alignment: 4 + m_WordWrap: 1 + m_RichText: 0 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: textButton + m_Normal: + m_Background: {fileID: 2800000, guid: d03222342209e43daaf2ca8d1364e47a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.58431375, g: 0.6, b: 0.58431375, a: 1} + m_Hover: + m_Background: {fileID: 2800000, guid: d03222342209e43daaf2ca8d1364e47a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.09411765, g: 0.7058824, b: 0.7607843, a: 1} + m_Active: + m_Background: {fileID: 2800000, guid: d03222342209e43daaf2ca8d1364e47a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.09411765, g: 0.7058824, b: 0.7607843, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 5 + m_Bottom: 5 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 96e17474f840a01459f0cc936c5d4d9b, type: 3} + m_FontSize: 11 + m_FontStyle: 0 + m_Alignment: 4 + m_WordWrap: 1 + m_RichText: 0 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: textButtonOr + m_Normal: + m_Background: {fileID: 2800000, guid: d03222342209e43daaf2ca8d1364e47a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 0.427451, b: 0.12941177, a: 1} + m_Hover: + m_Background: {fileID: 2800000, guid: d03222342209e43daaf2ca8d1364e47a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.09411765, g: 0.7058824, b: 0.7607843, a: 1} + m_Active: + m_Background: {fileID: 2800000, guid: d03222342209e43daaf2ca8d1364e47a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.09411765, g: 0.7058824, b: 0.7607843, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 5 + m_Bottom: 5 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 96e17474f840a01459f0cc936c5d4d9b, type: 3} + m_FontSize: 11 + m_FontStyle: 0 + m_Alignment: 4 + m_WordWrap: 1 + m_RichText: 0 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: textButton_selected + m_Normal: + m_Background: {fileID: 2800000, guid: d03222342209e43daaf2ca8d1364e47a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.09411765, g: 0.7058824, b: 0.7607843, a: 1} + m_Hover: + m_Background: {fileID: 2800000, guid: d03222342209e43daaf2ca8d1364e47a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 0.427451, b: 0.12941177, a: 1} + m_Active: + m_Background: {fileID: 2800000, guid: d03222342209e43daaf2ca8d1364e47a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.58431375, g: 0.6, b: 0.58431375, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 5 + m_Bottom: 5 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 96e17474f840a01459f0cc936c5d4d9b, type: 3} + m_FontSize: 11 + m_FontStyle: 0 + m_Alignment: 4 + m_WordWrap: 1 + m_RichText: 0 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: pfLogo + m_Normal: + m_Background: {fileID: 2800000, guid: 77e37f7fe73c7db4d9a1702eb4ad411b, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 5 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 0 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: listDisplay + m_Normal: + m_Background: {fileID: 2800000, guid: 9427eaf0703a74a008e9f9353562df39, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 20 + m_Right: 20 + m_Top: 20 + m_Bottom: 20 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 0 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: listDisplayBox + m_Normal: + m_Background: {fileID: 2800000, guid: 1c8aa345bd7fe44b88cf00b2f6b82579, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 10 + m_Bottom: 10 + m_Padding: + m_Left: 10 + m_Right: 5 + m_Top: 10 + m_Bottom: 10 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 0 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: progressBarBg + m_Normal: + m_Background: {fileID: 2800000, guid: 1c8aa345bd7fe44b88cf00b2f6b82579, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 2 + m_Bottom: 2 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 1 + m_Bottom: 1 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 0 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 6 + m_StretchWidth: 1 + m_StretchHeight: 0 + - m_Name: progressBarFg + m_Normal: + m_Background: {fileID: 2800000, guid: 83fd25cf40b81429ca784df9d37d32ba, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 4 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 0 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 4 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: progressBarError + m_Normal: + m_Background: {fileID: 2800000, guid: ba384a3c945464600a4046641bb57ca3, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 4 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 0 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 4 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: progressBarWarn + m_Normal: + m_Background: {fileID: 2800000, guid: a50d8da0637a640dda5e2018b972cade, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 4 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 0 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 4 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: progressBarSuccess + m_Normal: + m_Background: {fileID: 2800000, guid: f30842e29e3a14ecea9b07a2e8f04c55, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 4 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 0 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 4 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: progressBarClear + m_Normal: + m_Background: {fileID: 2800000, guid: d03222342209e43daaf2ca8d1364e47a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 4 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 0 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 6 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: gmIcon + m_Normal: + m_Background: {fileID: 2800000, guid: 4f1db872b2efa324c806fcbb54e19e1c, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Hover: + m_Background: {fileID: 2800000, guid: b43817ee9dda16c41a628a705526a021, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Active: + m_Background: {fileID: 2800000, guid: b43817ee9dda16c41a628a705526a021, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 4 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 0 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 25 + m_FixedHeight: 25 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: labelStyle + m_Normal: + m_Background: {fileID: 2800000, guid: d03222342209e43daaf2ca8d1364e47a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.58431375, g: 0.6, b: 0.58431375, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 5 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 96e17474f840a01459f0cc936c5d4d9b, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_Alignment: 3 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 0 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: genTxt + m_Normal: + m_Background: {fileID: 2800000, guid: d03222342209e43daaf2ca8d1364e47a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.58431375, g: 0.6, b: 0.58431375, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 5 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 436664d726292a54fa79d2168f4541ac, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 1 + m_RichText: 0 + m_TextClipping: 0 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: editTxt + m_Normal: + m_Background: {fileID: 2800000, guid: 14a4e823a9ef94dc18a71decc8453380, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.24264705, g: 0.24264705, b: 0.24264705, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 5 + m_Right: 5 + m_Top: 5 + m_Bottom: 5 + m_Padding: + m_Left: 10 + m_Right: 10 + m_Top: 10 + m_Bottom: 10 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 436664d726292a54fa79d2168f4541ac, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 1 + m_RichText: 1 + m_TextClipping: 0 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 1 + - m_Name: listKey + m_Normal: + m_Background: {fileID: 2800000, guid: 14a4e823a9ef94dc18a71decc8453380, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_Hover: + m_Background: {fileID: 2800000, guid: 2e064f0948b52496983fa0597fa61a0a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.09411765, g: 0.7058824, b: 0.7607843, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Focused: + m_Background: {fileID: 2800000, guid: 5f32aedbadeff4790a54248a66f0b89d, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.09411765, g: 0.7058824, b: 0.7607843, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 2 + m_Right: 2 + m_Top: 2 + m_Bottom: 2 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 96e17474f840a01459f0cc936c5d4d9b, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_Alignment: 3 + m_WordWrap: 1 + m_RichText: 0 + m_TextClipping: 1 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: listKey_dirty + m_Normal: + m_Background: {fileID: 2800000, guid: 9427eaf0703a74a008e9f9353562df39, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 0.427451, b: 0.12941177, a: 1} + m_Hover: + m_Background: {fileID: 2800000, guid: 9427eaf0703a74a008e9f9353562df39, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.36764705, g: 0.36764705, b: 0.36764705, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Focused: + m_Background: {fileID: 2800000, guid: 9427eaf0703a74a008e9f9353562df39, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 0.427451, b: 0.12941177, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 2 + m_Right: 2 + m_Top: 2 + m_Bottom: 2 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 96e17474f840a01459f0cc936c5d4d9b, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_Alignment: 3 + m_WordWrap: 1 + m_RichText: 0 + m_TextClipping: 1 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: listValue + m_Normal: + m_Background: {fileID: 2800000, guid: d03222342209e43daaf2ca8d1364e47a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.58431375, g: 0.6, b: 0.58431375, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 2 + m_Right: 2 + m_Top: 5 + m_Bottom: 2 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 436664d726292a54fa79d2168f4541ac, type: 3} + m_FontSize: 11 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 1 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: listValue_dirty + m_Normal: + m_Background: {fileID: 2800000, guid: 9427eaf0703a74a008e9f9353562df39, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 0.427451, b: 0.12941177, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 2 + m_Right: 2 + m_Top: 6 + m_Bottom: 2 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 436664d726292a54fa79d2168f4541ac, type: 3} + m_FontSize: 11 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 1 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: cGenTxt + m_Normal: + m_Background: {fileID: 2800000, guid: d03222342209e43daaf2ca8d1364e47a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.58431375, g: 0.6, b: 0.58431375, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 5 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 436664d726292a54fa79d2168f4541ac, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_Alignment: 4 + m_WordWrap: 1 + m_RichText: 0 + m_TextClipping: 0 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: orTxt + m_Normal: + m_Background: {fileID: 2800000, guid: d03222342209e43daaf2ca8d1364e47a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.9921569, g: 0.41960788, b: 0.050980397, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.9921569, g: 0.41960788, b: 0.050980397, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 5 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 436664d726292a54fa79d2168f4541ac, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_Alignment: 4 + m_WordWrap: 1 + m_RichText: 0 + m_TextClipping: 0 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: titleLabel + m_Normal: + m_Background: {fileID: 2800000, guid: d03222342209e43daaf2ca8d1364e47a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.58431375, g: 0.6, b: 0.58431375, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 5 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 96e17474f840a01459f0cc936c5d4d9b, type: 3} + m_FontSize: 20 + m_FontStyle: 0 + m_Alignment: 4 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 0 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: orTitle + m_Normal: + m_Background: {fileID: 2800000, guid: d03222342209e43daaf2ca8d1364e47a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 0.427451, b: 0.12941177, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 5 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 96e17474f840a01459f0cc936c5d4d9b, type: 3} + m_FontSize: 20 + m_FontStyle: 0 + m_Alignment: 4 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 0 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: versionText + m_Normal: + m_Background: {fileID: 2800000, guid: d03222342209e43daaf2ca8d1364e47a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.58431375, g: 0.6, b: 0.58431375, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 5 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 436664d726292a54fa79d2168f4541ac, type: 3} + m_FontSize: 12 + m_FontStyle: 0 + m_Alignment: 4 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 0 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: gpStyleGray1 + m_Normal: + m_Background: {fileID: 2800000, guid: 1c8aa345bd7fe44b88cf00b2f6b82579, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.58431375, g: 0.6, b: 0.58431375, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 3 + m_Bottom: 3 + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 5 + m_Bottom: 5 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 96e17474f840a01459f0cc936c5d4d9b, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_Alignment: 3 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 1 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: gpStyleGray2 + m_Normal: + m_Background: {fileID: 2800000, guid: 1c8aa345bd7fe44b88cf00b2f6b82579, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.58431375, g: 0.6, b: 0.58431375, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 5 + m_Bottom: 5 + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 5 + m_Bottom: 5 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 96e17474f840a01459f0cc936c5d4d9b, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_Alignment: 3 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 1 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: gpStyleGray3 + m_Normal: + m_Background: {fileID: 2800000, guid: 1c8aa345bd7fe44b88cf00b2f6b82579, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.58431375, g: 0.6, b: 0.58431375, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 5 + m_Bottom: 5 + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 5 + m_Bottom: 5 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 96e17474f840a01459f0cc936c5d4d9b, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_Alignment: 3 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 1 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: gpStyleGray4 + m_Normal: + m_Background: {fileID: 2800000, guid: 1c8aa345bd7fe44b88cf00b2f6b82579, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.58431375, g: 0.6, b: 0.58431375, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 5 + m_Bottom: 5 + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 5 + m_Bottom: 5 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 96e17474f840a01459f0cc936c5d4d9b, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_Alignment: 3 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 1 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: gpStyleClear + m_Normal: + m_Background: {fileID: 2800000, guid: d03222342209e43daaf2ca8d1364e47a, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.58431375, g: 0.6, b: 0.58431375, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 2 + m_Right: 2 + m_Top: 2 + m_Bottom: 2 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 96e17474f840a01459f0cc936c5d4d9b, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_Alignment: 3 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 1 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + - m_Name: gpStyleBlur + m_Normal: + m_Background: {fileID: 2800000, guid: 9de03259c3d2e43fc91ef7dc9054b186, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.58431375, g: 0.6, b: 0.58431375, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 0} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 12800000, guid: 96e17474f840a01459f0cc936c5d4d9b, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_Alignment: 3 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 1 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 1 + - m_Name: foldOut_std + m_Normal: + m_Background: {fileID: 2800000, guid: 677a55eab8f234e688ec4c6be70208bb, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.58431375, g: 0.6, b: 0.58431375, a: 1} + m_Hover: + m_Background: {fileID: 2800000, guid: d396473974f984567a8e398f1ebd9ec9, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.09411765, g: 0.7058824, b: 0.7607843, a: 1} + m_Active: + m_Background: {fileID: 2800000, guid: 677a55eab8f234e688ec4c6be70208bb, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.58431375, g: 0.6, b: 0.58431375, a: 1} + m_Focused: + m_Background: {fileID: 2800000, guid: d396473974f984567a8e398f1ebd9ec9, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.09411765, g: 0.7058824, b: 0.7607843, a: 1} + m_OnNormal: + m_Background: {fileID: 2800000, guid: 43f13eb24deac4ae5a86c25189272a74, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.58431375, g: 0.6, b: 0.58431375, a: 1} + m_OnHover: + m_Background: {fileID: 2800000, guid: 93e56b7e753794953939a50df2c9c323, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.09411765, g: 0.7058824, b: 0.7607843, a: 1} + m_OnActive: + m_Background: {fileID: 2800000, guid: 93e56b7e753794953939a50df2c9c323, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.58431375, g: 0.6, b: 0.58431375, a: 1} + m_OnFocused: + m_Background: {fileID: 2800000, guid: 93e56b7e753794953939a50df2c9c323, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.09411765, g: 0.7058824, b: 0.7607843, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 11 + m_FontStyle: 0 + m_Alignment: 3 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 0 + m_ImagePosition: 0 + m_ContentOffset: {x: 15, y: 0} + m_FixedWidth: 10 + m_FixedHeight: 10 + m_StretchWidth: 0 + m_StretchHeight: 0 + m_Settings: + m_DoubleClickSelectsWord: 1 + m_TripleClickSelectsLine: 1 + m_CursorColor: {r: 0, g: 0, b: 0, a: 1} + m_CursorFlashSpeed: -1 + m_SelectionColor: {r: 0.58431375, g: 0.6, b: 0.58431375, a: 1} diff --git a/Assets/PlayFabEditorExtensions/Editor/UI/PlayFabStyles.guiskin.meta b/Assets/PlayFabEditorExtensions/Editor/UI/PlayFabStyles.guiskin.meta new file mode 100644 index 0000000000000000000000000000000000000000..50ac5747ffedd6be14f39544c7c001563b2fd7d3 --- /dev/null +++ b/Assets/PlayFabEditorExtensions/Editor/UI/PlayFabStyles.guiskin.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d04ab90b288304956b142858114b4310 +timeCreated: 1468007030 +licenseType: Pro +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK.meta b/Assets/PlayFabSDK.meta new file mode 100644 index 0000000000000000000000000000000000000000..0f7c1908c421af62735a31b67c69534c64e3aebc --- /dev/null +++ b/Assets/PlayFabSDK.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e53d5e839d5caa945b9b859abe15689b +folderAsset: yes +timeCreated: 1558474635 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Admin.meta b/Assets/PlayFabSDK/Admin.meta new file mode 100644 index 0000000000000000000000000000000000000000..a865e687ef2dc68212a7c47700152a50042dc6e8 --- /dev/null +++ b/Assets/PlayFabSDK/Admin.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f80b73ed5fc053a409c5e9347d9c609a +folderAsset: yes +timeCreated: 1468524875 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Admin/PlayFabAdminAPI.cs b/Assets/PlayFabSDK/Admin/PlayFabAdminAPI.cs new file mode 100644 index 0000000000000000000000000000000000000000..f75c4bb783b9e0e127e1b5d517a1be281ae51913 --- /dev/null +++ b/Assets/PlayFabSDK/Admin/PlayFabAdminAPI.cs @@ -0,0 +1,1575 @@ +#if ENABLE_PLAYFABADMIN_API && !DISABLE_PLAYFAB_STATIC_API + +using System; +using System.Collections.Generic; +using PlayFab.AdminModels; +using PlayFab.Internal; + +namespace PlayFab +{ + /// + /// APIs for managing title configurations, uploaded Game Server code executables, and user data + /// + public static class PlayFabAdminAPI + { + static PlayFabAdminAPI() {} + + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public static void ForgetAllCredentials() + { + PlayFabSettings.staticPlayer.ForgetAllCredentials(); + } + + /// + /// Abort an ongoing task instance. + /// + public static void AbortTaskInstance(AbortTaskInstanceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/AbortTaskInstance", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Update news item to include localized version + /// + public static void AddLocalizedNews(AddLocalizedNewsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/AddLocalizedNews", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds a new news item to the title's news feed + /// + public static void AddNews(AddNewsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/AddNews", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds a given tag to a player profile. The tag's namespace is automatically generated based on the source of the tag. + /// + public static void AddPlayerTag(AddPlayerTagRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/AddPlayerTag", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds the game server executable specified (previously uploaded - see GetServerBuildUploadUrl) to the set of those a + /// client is permitted to request in a call to StartGame + /// + public static void AddServerBuild(AddServerBuildRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/AddServerBuild", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Increments the specified virtual currency by the stated amount + /// + public static void AddUserVirtualCurrency(AddUserVirtualCurrencyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/AddUserVirtualCurrency", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds one or more virtual currencies to the set defined for the title. Virtual Currencies have a maximum value of + /// 2,147,483,647 when granted to a player. Any value over that will be discarded. + /// + public static void AddVirtualCurrencyTypes(AddVirtualCurrencyTypesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/AddVirtualCurrencyTypes", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Bans users by PlayFab ID with optional IP address, or MAC address for the provided game. + /// + public static void BanUsers(BanUsersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/BanUsers", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Checks the global count for the limited edition item. + /// + public static void CheckLimitedEditionItemAvailability(CheckLimitedEditionItemAvailabilityRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/CheckLimitedEditionItemAvailability", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Create an ActionsOnPlayersInSegment task, which iterates through all players in a segment to execute action. + /// + public static void CreateActionsOnPlayersInSegmentTask(CreateActionsOnPlayerSegmentTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/CreateActionsOnPlayersInSegmentTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Create a CloudScript task, which can run a CloudScript on a schedule. + /// + public static void CreateCloudScriptTask(CreateCloudScriptTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/CreateCloudScriptTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Create a Insights Scheduled Scaling task, which can scale Insights Performance Units on a schedule + /// + public static void CreateInsightsScheduledScalingTask(CreateInsightsScheduledScalingTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/CreateInsightsScheduledScalingTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Registers a relationship between a title and an Open ID Connect provider. + /// + public static void CreateOpenIdConnection(CreateOpenIdConnectionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/CreateOpenIdConnection", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates a new Player Shared Secret Key. It may take up to 5 minutes for this key to become generally available after + /// this API returns. + /// + public static void CreatePlayerSharedSecret(CreatePlayerSharedSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/CreatePlayerSharedSecret", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds a new player statistic configuration to the title, optionally allowing the developer to specify a reset interval + /// and an aggregation method. + /// + public static void CreatePlayerStatisticDefinition(CreatePlayerStatisticDefinitionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/CreatePlayerStatisticDefinition", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates a new player segment by defining the conditions on player properties. Also, create actions to target the player + /// segments for a title. + /// + public static void CreateSegment(CreateSegmentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/CreateSegment", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Delete a content file from the title. When deleting a file that does not exist, it returns success. + /// + public static void DeleteContent(DeleteContentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/DeleteContent", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Removes a master player account entirely from all titles and deletes all associated data + /// + public static void DeleteMasterPlayerAccount(DeleteMasterPlayerAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/DeleteMasterPlayerAccount", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Removes a relationship between a title and an OpenID Connect provider. + /// + public static void DeleteOpenIdConnection(DeleteOpenIdConnectionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/DeleteOpenIdConnection", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Removes a user's player account from a title and deletes all associated data + /// + public static void DeletePlayer(DeletePlayerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/DeletePlayer", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes an existing Player Shared Secret Key. It may take up to 5 minutes for this delete to be reflected after this API + /// returns. + /// + public static void DeletePlayerSharedSecret(DeletePlayerSharedSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/DeletePlayerSharedSecret", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes an existing player segment and its associated action(s) for a title. + /// + public static void DeleteSegment(DeleteSegmentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/DeleteSegment", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes an existing virtual item store + /// + public static void DeleteStore(DeleteStoreRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/DeleteStore", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Delete a task. + /// + public static void DeleteTask(DeleteTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/DeleteTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Permanently deletes a title and all associated configuration + /// + public static void DeleteTitle(DeleteTitleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/DeleteTitle", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes a specified set of title data overrides. + /// + public static void DeleteTitleDataOverride(DeleteTitleDataOverrideRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/DeleteTitleDataOverride", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Exports all associated data of a master player account + /// + public static void ExportMasterPlayerData(ExportMasterPlayerDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/ExportMasterPlayerData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get information about a ActionsOnPlayersInSegment task instance. + /// + public static void GetActionsOnPlayersInSegmentTaskInstance(GetTaskInstanceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetActionsOnPlayersInSegmentTaskInstance", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves an array of player segment definitions. Results from this can be used in subsequent API calls such as + /// GetPlayersInSegment which requires a Segment ID. While segment names can change the ID for that segment will not change. + /// + public static void GetAllSegments(GetAllSegmentsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetAllSegments", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the specified version of the title's catalog of virtual goods, including all defined properties + /// + public static void GetCatalogItems(GetCatalogItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetCatalogItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets the contents and information of a specific Cloud Script revision. + /// + public static void GetCloudScriptRevision(GetCloudScriptRevisionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetCloudScriptRevision", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get detail information about a CloudScript task instance. + /// + public static void GetCloudScriptTaskInstance(GetTaskInstanceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetCloudScriptTaskInstance", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists all the current cloud script versions. For each version, information about the current published and latest + /// revisions is also listed. + /// + public static void GetCloudScriptVersions(GetCloudScriptVersionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetCloudScriptVersions", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// List all contents of the title and get statistics such as size + /// + public static void GetContentList(GetContentListRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetContentList", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the pre-signed URL for uploading a content file. A subsequent HTTP PUT to the returned URL uploads the + /// content. Also, please be aware that the Content service is specifically PlayFab's CDN offering, for which standard CDN + /// rates apply. + /// + public static void GetContentUploadUrl(GetContentUploadUrlRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetContentUploadUrl", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a download URL for the requested report + /// + public static void GetDataReport(GetDataReportRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetDataReport", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the details for a specific completed session, including links to standard out and standard error logs + /// + public static void GetMatchmakerGameInfo(GetMatchmakerGameInfoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetMatchmakerGameInfo", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the details of defined game modes for the specified game server executable + /// + public static void GetMatchmakerGameModes(GetMatchmakerGameModesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetMatchmakerGameModes", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get the list of titles that the player has played + /// + public static void GetPlayedTitleList(GetPlayedTitleListRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetPlayedTitleList", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets a player's ID from an auth token. + /// + public static void GetPlayerIdFromAuthToken(GetPlayerIdFromAuthTokenRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetPlayerIdFromAuthToken", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the player's profile + /// + public static void GetPlayerProfile(GetPlayerProfileRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetPlayerProfile", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// List all segments that a player currently belongs to at this moment in time. + /// + public static void GetPlayerSegments(GetPlayersSegmentsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetPlayerSegments", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Returns all Player Shared Secret Keys including disabled and expired. + /// + public static void GetPlayerSharedSecrets(GetPlayerSharedSecretsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetPlayerSharedSecrets", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Allows for paging through all players in a given segment. This API creates a snapshot of all player profiles that match + /// the segment definition at the time of its creation and lives through the Total Seconds to Live, refreshing its life span + /// on each subsequent use of the Continuation Token. Profiles that change during the course of paging will not be reflected + /// in the results. AB Test segments are currently not supported by this operation. NOTE: This API is limited to being + /// called 30 times in one minute. You will be returned an error if you exceed this threshold. + /// + public static void GetPlayersInSegment(GetPlayersInSegmentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetPlayersInSegment", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the configuration information for all player statistics defined in the title, regardless of whether they have + /// a reset interval. + /// + public static void GetPlayerStatisticDefinitions(GetPlayerStatisticDefinitionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetPlayerStatisticDefinitions", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the information on the available versions of the specified statistic. + /// + public static void GetPlayerStatisticVersions(GetPlayerStatisticVersionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetPlayerStatisticVersions", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get all tags with a given Namespace (optional) from a player profile. + /// + public static void GetPlayerTags(GetPlayerTagsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetPlayerTags", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets the requested policy. + /// + public static void GetPolicy(GetPolicyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetPolicy", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the key-value store of custom publisher settings + /// + public static void GetPublisherData(GetPublisherDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the random drop table configuration for the title + /// + public static void GetRandomResultTables(GetRandomResultTablesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetRandomResultTables", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get detail information of a segment and its associated definition(s) and action(s) for a title. + /// + public static void GetSegments(GetSegmentsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetSegments", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the build details for the specified game server executable + /// + public static void GetServerBuildInfo(GetServerBuildInfoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetServerBuildInfo", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the pre-authorized URL for uploading a game server package containing a build (does not enable the build for + /// use - see AddServerBuild) + /// + public static void GetServerBuildUploadUrl(GetServerBuildUploadURLRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetServerBuildUploadUrl", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the set of items defined for the specified store, including all prices defined + /// + public static void GetStoreItems(GetStoreItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetStoreItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Query for task instances by task, status, or time range. + /// + public static void GetTaskInstances(GetTaskInstancesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetTaskInstances", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get definition information on a specified task or all tasks within a title. + /// + public static void GetTasks(GetTasksRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetTasks", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the key-value store of custom title settings which can be read by the client + /// + public static void GetTitleData(GetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetTitleData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the key-value store of custom title settings which cannot be read by the client + /// + public static void GetTitleInternalData(GetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetTitleInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the relevant details for a specified user, based upon a match against a supplied unique identifier + /// + public static void GetUserAccountInfo(LookupUserAccountInfoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetUserAccountInfo", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets all bans for a user. + /// + public static void GetUserBans(GetUserBansRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetUserBans", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the title-specific custom data for the user which is readable and writable by the client + /// + public static void GetUserData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetUserData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the title-specific custom data for the user which cannot be accessed by the client + /// + public static void GetUserInternalData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetUserInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the specified user's current inventory of virtual goods + /// + public static void GetUserInventory(GetUserInventoryRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetUserInventory", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the publisher-specific custom data for the user which is readable and writable by the client + /// + public static void GetUserPublisherData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetUserPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the publisher-specific custom data for the user which cannot be accessed by the client + /// + public static void GetUserPublisherInternalData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetUserPublisherInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the publisher-specific custom data for the user which can only be read by the client + /// + public static void GetUserPublisherReadOnlyData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetUserPublisherReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the title-specific custom data for the user which can only be read by the client + /// + public static void GetUserReadOnlyData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetUserReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds the specified items to the specified user inventories + /// + public static void GrantItemsToUsers(GrantItemsToUsersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GrantItemsToUsers", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Increases the global count for the given scarce resource. + /// + public static void IncrementLimitedEditionItemAvailability(IncrementLimitedEditionItemAvailabilityRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/IncrementLimitedEditionItemAvailability", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Resets the indicated statistic, removing all player entries for it and backing up the old values. + /// + public static void IncrementPlayerStatisticVersion(IncrementPlayerStatisticVersionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/IncrementPlayerStatisticVersion", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a list of all Open ID Connect providers registered to a title. + /// + public static void ListOpenIdConnection(ListOpenIdConnectionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/ListOpenIdConnection", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the build details for all game server executables which are currently defined for the title + /// + public static void ListServerBuilds(ListBuildsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/ListServerBuilds", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retuns the list of all defined virtual currencies for the title + /// + public static void ListVirtualCurrencyTypes(ListVirtualCurrencyTypesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/ListVirtualCurrencyTypes", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the game server mode details for the specified game server executable + /// + public static void ModifyMatchmakerGameModes(ModifyMatchmakerGameModesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/ModifyMatchmakerGameModes", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the build details for the specified game server executable + /// + public static void ModifyServerBuild(ModifyServerBuildRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/ModifyServerBuild", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Attempts to process an order refund through the original real money payment provider. + /// + public static void RefundPurchase(RefundPurchaseRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/RefundPurchase", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Remove a given tag from a player profile. The tag's namespace is automatically generated based on the source of the tag. + /// + public static void RemovePlayerTag(RemovePlayerTagRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/RemovePlayerTag", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Removes the game server executable specified from the set of those a client is permitted to request in a call to + /// StartGame + /// + public static void RemoveServerBuild(RemoveServerBuildRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/RemoveServerBuild", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Removes one or more virtual currencies from the set defined for the title. + /// + public static void RemoveVirtualCurrencyTypes(RemoveVirtualCurrencyTypesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/RemoveVirtualCurrencyTypes", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Completely removes all statistics for the specified character, for the current game + /// + public static void ResetCharacterStatistics(ResetCharacterStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/ResetCharacterStatistics", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Reset a player's password for a given title. + /// + public static void ResetPassword(ResetPasswordRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/ResetPassword", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Completely removes all statistics for the specified user, for the current game + /// + public static void ResetUserStatistics(ResetUserStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/ResetUserStatistics", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Attempts to resolve a dispute with the original order's payment provider. + /// + public static void ResolvePurchaseDispute(ResolvePurchaseDisputeRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/ResolvePurchaseDispute", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Revoke all active bans for a user. + /// + public static void RevokeAllBansForUser(RevokeAllBansForUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/RevokeAllBansForUser", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Revoke all active bans specified with BanId. + /// + public static void RevokeBans(RevokeBansRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/RevokeBans", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Revokes access to an item in a user's inventory + /// + public static void RevokeInventoryItem(RevokeInventoryItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/RevokeInventoryItem", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Revokes access for up to 25 items across multiple users and characters. + /// + public static void RevokeInventoryItems(RevokeInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/RevokeInventoryItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Run a task immediately regardless of its schedule. + /// + public static void RunTask(RunTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/RunTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Forces an email to be sent to the registered email address for the user's account, with a link allowing the user to + /// change the password.If an account recovery email template ID is provided, an email using the custom email template will + /// be used. + /// + public static void SendAccountRecoveryEmail(SendAccountRecoveryEmailRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/SendAccountRecoveryEmail", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates the catalog configuration of all virtual goods for the specified catalog version + /// + public static void SetCatalogItems(UpdateCatalogItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/SetCatalogItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Sets or resets the player's secret. Player secrets are used to sign API requests. + /// + public static void SetPlayerSecret(SetPlayerSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/SetPlayerSecret", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Sets the currently published revision of a title Cloud Script + /// + public static void SetPublishedRevision(SetPublishedRevisionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/SetPublishedRevision", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the key-value store of custom publisher settings + /// + public static void SetPublisherData(SetPublisherDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/SetPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Sets all the items in one virtual store + /// + public static void SetStoreItems(UpdateStoreItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/SetStoreItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates and updates the key-value store of custom title settings which can be read by the client + /// + public static void SetTitleData(SetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/SetTitleData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Set and delete key-value pairs in a title data override instance. + /// + public static void SetTitleDataAndOverrides(SetTitleDataAndOverridesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/SetTitleDataAndOverrides", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the key-value store of custom title settings which cannot be read by the client + /// + public static void SetTitleInternalData(SetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/SetTitleInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Sets the Amazon Resource Name (ARN) for iOS and Android push notifications. Documentation on the exact restrictions can + /// be found at: http://docs.aws.amazon.com/sns/latest/api/API_CreatePlatformApplication.html. Currently, Amazon device + /// Messaging is not supported. + /// + public static void SetupPushNotification(SetupPushNotificationRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/SetupPushNotification", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Decrements the specified virtual currency by the stated amount + /// + public static void SubtractUserVirtualCurrency(SubtractUserVirtualCurrencyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/SubtractUserVirtualCurrency", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates information of a list of existing bans specified with Ban Ids. + /// + public static void UpdateBans(UpdateBansRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateBans", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the catalog configuration for virtual goods in the specified catalog version + /// + public static void UpdateCatalogItems(UpdateCatalogItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateCatalogItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates a new Cloud Script revision and uploads source code to it. Note that at this time, only one file should be + /// submitted in the revision. + /// + public static void UpdateCloudScript(UpdateCloudScriptRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateCloudScript", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Modifies data and credentials for an existing relationship between a title and an Open ID Connect provider + /// + public static void UpdateOpenIdConnection(UpdateOpenIdConnectionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateOpenIdConnection", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates a existing Player Shared Secret Key. It may take up to 5 minutes for this update to become generally available + /// after this API returns. + /// + public static void UpdatePlayerSharedSecret(UpdatePlayerSharedSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdatePlayerSharedSecret", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates a player statistic configuration for the title, optionally allowing the developer to specify a reset interval. + /// + public static void UpdatePlayerStatisticDefinition(UpdatePlayerStatisticDefinitionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdatePlayerStatisticDefinition", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Changes a policy for a title + /// + public static void UpdatePolicy(UpdatePolicyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdatePolicy", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the random drop table configuration for the title + /// + public static void UpdateRandomResultTables(UpdateRandomResultTablesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateRandomResultTables", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates an existing player segment and its associated definition(s) and action(s) for a title. + /// + public static void UpdateSegment(UpdateSegmentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateSegment", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates an existing virtual item store with new or modified items + /// + public static void UpdateStoreItems(UpdateStoreItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateStoreItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Update an existing task. + /// + public static void UpdateTask(UpdateTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the title-specific custom data for the user which is readable and writable by the client + /// + public static void UpdateUserData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateUserData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the title-specific custom data for the user which cannot be accessed by the client + /// + public static void UpdateUserInternalData(UpdateUserInternalDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateUserInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the publisher-specific custom data for the user which is readable and writable by the client + /// + public static void UpdateUserPublisherData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateUserPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the publisher-specific custom data for the user which cannot be accessed by the client + /// + public static void UpdateUserPublisherInternalData(UpdateUserInternalDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateUserPublisherInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the publisher-specific custom data for the user which can only be read by the client + /// + public static void UpdateUserPublisherReadOnlyData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateUserPublisherReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the title-specific custom data for the user which can only be read by the client + /// + public static void UpdateUserReadOnlyData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateUserReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the title specific display name for a user + /// + public static void UpdateUserTitleDisplayName(UpdateUserTitleDisplayNameRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateUserTitleDisplayName", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Admin/PlayFabAdminAPI.cs.meta b/Assets/PlayFabSDK/Admin/PlayFabAdminAPI.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..ec37b6e1ddc95488b67a9cfb976ae3b3c788116d --- /dev/null +++ b/Assets/PlayFabSDK/Admin/PlayFabAdminAPI.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 98aa7d0b4d53fe24392fc8cc52120845 +timeCreated: 1468524876 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Admin/PlayFabAdminInstanceAPI.cs b/Assets/PlayFabSDK/Admin/PlayFabAdminInstanceAPI.cs new file mode 100644 index 0000000000000000000000000000000000000000..5f2a3e1f2515e02c94dce7ea2ad5abe0d7969f9c --- /dev/null +++ b/Assets/PlayFabSDK/Admin/PlayFabAdminInstanceAPI.cs @@ -0,0 +1,1362 @@ +#if ENABLE_PLAYFABADMIN_API + +using System; +using System.Collections.Generic; +using PlayFab.AdminModels; +using PlayFab.Internal; +using PlayFab.SharedModels; + +namespace PlayFab +{ + /// + /// APIs for managing title configurations, uploaded Game Server code executables, and user data + /// + public class PlayFabAdminInstanceAPI : IPlayFabInstanceApi + { + public readonly PlayFabApiSettings apiSettings = null; + public readonly PlayFabAuthenticationContext authenticationContext = null; + + public PlayFabAdminInstanceAPI() { } + + public PlayFabAdminInstanceAPI(PlayFabApiSettings settings) + { + apiSettings = settings; + } + + public PlayFabAdminInstanceAPI(PlayFabAuthenticationContext context) + { + authenticationContext = context; + } + + public PlayFabAdminInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context) + { + apiSettings = settings; + authenticationContext = context; + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public void ForgetAllCredentials() + { + if (authenticationContext != null) + { + authenticationContext.ForgetAllCredentials(); + } + } + + /// + /// Abort an ongoing task instance. + /// + public void AbortTaskInstance(AbortTaskInstanceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/AbortTaskInstance", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Update news item to include localized version + /// + public void AddLocalizedNews(AddLocalizedNewsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/AddLocalizedNews", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Adds a new news item to the title's news feed + /// + public void AddNews(AddNewsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/AddNews", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Adds a given tag to a player profile. The tag's namespace is automatically generated based on the source of the tag. + /// + public void AddPlayerTag(AddPlayerTagRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/AddPlayerTag", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Adds the game server executable specified (previously uploaded - see GetServerBuildUploadUrl) to the set of those a + /// client is permitted to request in a call to StartGame + /// + public void AddServerBuild(AddServerBuildRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/AddServerBuild", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Increments the specified virtual currency by the stated amount + /// + public void AddUserVirtualCurrency(AddUserVirtualCurrencyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/AddUserVirtualCurrency", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Adds one or more virtual currencies to the set defined for the title. Virtual Currencies have a maximum value of + /// 2,147,483,647 when granted to a player. Any value over that will be discarded. + /// + public void AddVirtualCurrencyTypes(AddVirtualCurrencyTypesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/AddVirtualCurrencyTypes", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Bans users by PlayFab ID with optional IP address, or MAC address for the provided game. + /// + public void BanUsers(BanUsersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/BanUsers", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Checks the global count for the limited edition item. + /// + public void CheckLimitedEditionItemAvailability(CheckLimitedEditionItemAvailabilityRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/CheckLimitedEditionItemAvailability", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Create an ActionsOnPlayersInSegment task, which iterates through all players in a segment to execute action. + /// + public void CreateActionsOnPlayersInSegmentTask(CreateActionsOnPlayerSegmentTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/CreateActionsOnPlayersInSegmentTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Create a CloudScript task, which can run a CloudScript on a schedule. + /// + public void CreateCloudScriptTask(CreateCloudScriptTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/CreateCloudScriptTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Create a Insights Scheduled Scaling task, which can scale Insights Performance Units on a schedule + /// + public void CreateInsightsScheduledScalingTask(CreateInsightsScheduledScalingTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/CreateInsightsScheduledScalingTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Registers a relationship between a title and an Open ID Connect provider. + /// + public void CreateOpenIdConnection(CreateOpenIdConnectionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/CreateOpenIdConnection", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates a new Player Shared Secret Key. It may take up to 5 minutes for this key to become generally available after + /// this API returns. + /// + public void CreatePlayerSharedSecret(CreatePlayerSharedSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/CreatePlayerSharedSecret", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Adds a new player statistic configuration to the title, optionally allowing the developer to specify a reset interval + /// and an aggregation method. + /// + public void CreatePlayerStatisticDefinition(CreatePlayerStatisticDefinitionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/CreatePlayerStatisticDefinition", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates a new player segment by defining the conditions on player properties. Also, create actions to target the player + /// segments for a title. + /// + public void CreateSegment(CreateSegmentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/CreateSegment", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Delete a content file from the title. When deleting a file that does not exist, it returns success. + /// + public void DeleteContent(DeleteContentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/DeleteContent", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Removes a master player account entirely from all titles and deletes all associated data + /// + public void DeleteMasterPlayerAccount(DeleteMasterPlayerAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/DeleteMasterPlayerAccount", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Removes a relationship between a title and an OpenID Connect provider. + /// + public void DeleteOpenIdConnection(DeleteOpenIdConnectionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/DeleteOpenIdConnection", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Removes a user's player account from a title and deletes all associated data + /// + public void DeletePlayer(DeletePlayerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/DeletePlayer", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes an existing Player Shared Secret Key. It may take up to 5 minutes for this delete to be reflected after this API + /// returns. + /// + public void DeletePlayerSharedSecret(DeletePlayerSharedSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/DeletePlayerSharedSecret", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes an existing player segment and its associated action(s) for a title. + /// + public void DeleteSegment(DeleteSegmentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/DeleteSegment", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes an existing virtual item store + /// + public void DeleteStore(DeleteStoreRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/DeleteStore", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Delete a task. + /// + public void DeleteTask(DeleteTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/DeleteTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Permanently deletes a title and all associated configuration + /// + public void DeleteTitle(DeleteTitleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/DeleteTitle", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes a specified set of title data overrides. + /// + public void DeleteTitleDataOverride(DeleteTitleDataOverrideRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/DeleteTitleDataOverride", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Exports all associated data of a master player account + /// + public void ExportMasterPlayerData(ExportMasterPlayerDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/ExportMasterPlayerData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get information about a ActionsOnPlayersInSegment task instance. + /// + public void GetActionsOnPlayersInSegmentTaskInstance(GetTaskInstanceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetActionsOnPlayersInSegmentTaskInstance", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves an array of player segment definitions. Results from this can be used in subsequent API calls such as + /// GetPlayersInSegment which requires a Segment ID. While segment names can change the ID for that segment will not change. + /// + public void GetAllSegments(GetAllSegmentsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetAllSegments", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the specified version of the title's catalog of virtual goods, including all defined properties + /// + public void GetCatalogItems(GetCatalogItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetCatalogItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets the contents and information of a specific Cloud Script revision. + /// + public void GetCloudScriptRevision(GetCloudScriptRevisionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetCloudScriptRevision", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get detail information about a CloudScript task instance. + /// + public void GetCloudScriptTaskInstance(GetTaskInstanceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetCloudScriptTaskInstance", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists all the current cloud script versions. For each version, information about the current published and latest + /// revisions is also listed. + /// + public void GetCloudScriptVersions(GetCloudScriptVersionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetCloudScriptVersions", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// List all contents of the title and get statistics such as size + /// + public void GetContentList(GetContentListRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetContentList", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the pre-signed URL for uploading a content file. A subsequent HTTP PUT to the returned URL uploads the + /// content. Also, please be aware that the Content service is specifically PlayFab's CDN offering, for which standard CDN + /// rates apply. + /// + public void GetContentUploadUrl(GetContentUploadUrlRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetContentUploadUrl", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves a download URL for the requested report + /// + public void GetDataReport(GetDataReportRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetDataReport", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the details for a specific completed session, including links to standard out and standard error logs + /// + public void GetMatchmakerGameInfo(GetMatchmakerGameInfoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetMatchmakerGameInfo", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the details of defined game modes for the specified game server executable + /// + public void GetMatchmakerGameModes(GetMatchmakerGameModesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetMatchmakerGameModes", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get the list of titles that the player has played + /// + public void GetPlayedTitleList(GetPlayedTitleListRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetPlayedTitleList", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets a player's ID from an auth token. + /// + public void GetPlayerIdFromAuthToken(GetPlayerIdFromAuthTokenRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetPlayerIdFromAuthToken", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the player's profile + /// + public void GetPlayerProfile(GetPlayerProfileRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetPlayerProfile", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// List all segments that a player currently belongs to at this moment in time. + /// + public void GetPlayerSegments(GetPlayersSegmentsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetPlayerSegments", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Returns all Player Shared Secret Keys including disabled and expired. + /// + public void GetPlayerSharedSecrets(GetPlayerSharedSecretsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetPlayerSharedSecrets", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Allows for paging through all players in a given segment. This API creates a snapshot of all player profiles that match + /// the segment definition at the time of its creation and lives through the Total Seconds to Live, refreshing its life span + /// on each subsequent use of the Continuation Token. Profiles that change during the course of paging will not be reflected + /// in the results. AB Test segments are currently not supported by this operation. NOTE: This API is limited to being + /// called 30 times in one minute. You will be returned an error if you exceed this threshold. + /// + public void GetPlayersInSegment(GetPlayersInSegmentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetPlayersInSegment", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the configuration information for all player statistics defined in the title, regardless of whether they have + /// a reset interval. + /// + public void GetPlayerStatisticDefinitions(GetPlayerStatisticDefinitionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetPlayerStatisticDefinitions", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the information on the available versions of the specified statistic. + /// + public void GetPlayerStatisticVersions(GetPlayerStatisticVersionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetPlayerStatisticVersions", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get all tags with a given Namespace (optional) from a player profile. + /// + public void GetPlayerTags(GetPlayerTagsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetPlayerTags", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets the requested policy. + /// + public void GetPolicy(GetPolicyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetPolicy", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the key-value store of custom publisher settings + /// + public void GetPublisherData(GetPublisherDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the random drop table configuration for the title + /// + public void GetRandomResultTables(GetRandomResultTablesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetRandomResultTables", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get detail information of a segment and its associated definition(s) and action(s) for a title. + /// + public void GetSegments(GetSegmentsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetSegments", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the build details for the specified game server executable + /// + public void GetServerBuildInfo(GetServerBuildInfoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetServerBuildInfo", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the pre-authorized URL for uploading a game server package containing a build (does not enable the build for + /// use - see AddServerBuild) + /// + public void GetServerBuildUploadUrl(GetServerBuildUploadURLRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetServerBuildUploadUrl", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the set of items defined for the specified store, including all prices defined + /// + public void GetStoreItems(GetStoreItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetStoreItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Query for task instances by task, status, or time range. + /// + public void GetTaskInstances(GetTaskInstancesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetTaskInstances", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get definition information on a specified task or all tasks within a title. + /// + public void GetTasks(GetTasksRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetTasks", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the key-value store of custom title settings which can be read by the client + /// + public void GetTitleData(GetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetTitleData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the key-value store of custom title settings which cannot be read by the client + /// + public void GetTitleInternalData(GetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetTitleInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the relevant details for a specified user, based upon a match against a supplied unique identifier + /// + public void GetUserAccountInfo(LookupUserAccountInfoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetUserAccountInfo", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets all bans for a user. + /// + public void GetUserBans(GetUserBansRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetUserBans", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the title-specific custom data for the user which is readable and writable by the client + /// + public void GetUserData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetUserData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the title-specific custom data for the user which cannot be accessed by the client + /// + public void GetUserInternalData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetUserInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the specified user's current inventory of virtual goods + /// + public void GetUserInventory(GetUserInventoryRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetUserInventory", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the publisher-specific custom data for the user which is readable and writable by the client + /// + public void GetUserPublisherData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetUserPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the publisher-specific custom data for the user which cannot be accessed by the client + /// + public void GetUserPublisherInternalData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetUserPublisherInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the publisher-specific custom data for the user which can only be read by the client + /// + public void GetUserPublisherReadOnlyData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetUserPublisherReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the title-specific custom data for the user which can only be read by the client + /// + public void GetUserReadOnlyData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetUserReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Adds the specified items to the specified user inventories + /// + public void GrantItemsToUsers(GrantItemsToUsersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GrantItemsToUsers", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Increases the global count for the given scarce resource. + /// + public void IncrementLimitedEditionItemAvailability(IncrementLimitedEditionItemAvailabilityRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/IncrementLimitedEditionItemAvailability", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Resets the indicated statistic, removing all player entries for it and backing up the old values. + /// + public void IncrementPlayerStatisticVersion(IncrementPlayerStatisticVersionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/IncrementPlayerStatisticVersion", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves a list of all Open ID Connect providers registered to a title. + /// + public void ListOpenIdConnection(ListOpenIdConnectionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/ListOpenIdConnection", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the build details for all game server executables which are currently defined for the title + /// + public void ListServerBuilds(ListBuildsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/ListServerBuilds", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retuns the list of all defined virtual currencies for the title + /// + public void ListVirtualCurrencyTypes(ListVirtualCurrencyTypesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/ListVirtualCurrencyTypes", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the game server mode details for the specified game server executable + /// + public void ModifyMatchmakerGameModes(ModifyMatchmakerGameModesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/ModifyMatchmakerGameModes", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the build details for the specified game server executable + /// + public void ModifyServerBuild(ModifyServerBuildRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/ModifyServerBuild", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Attempts to process an order refund through the original real money payment provider. + /// + public void RefundPurchase(RefundPurchaseRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/RefundPurchase", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Remove a given tag from a player profile. The tag's namespace is automatically generated based on the source of the tag. + /// + public void RemovePlayerTag(RemovePlayerTagRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/RemovePlayerTag", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Removes the game server executable specified from the set of those a client is permitted to request in a call to + /// StartGame + /// + public void RemoveServerBuild(RemoveServerBuildRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/RemoveServerBuild", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Removes one or more virtual currencies from the set defined for the title. + /// + public void RemoveVirtualCurrencyTypes(RemoveVirtualCurrencyTypesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/RemoveVirtualCurrencyTypes", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Completely removes all statistics for the specified character, for the current game + /// + public void ResetCharacterStatistics(ResetCharacterStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/ResetCharacterStatistics", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Reset a player's password for a given title. + /// + public void ResetPassword(ResetPasswordRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/ResetPassword", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Completely removes all statistics for the specified user, for the current game + /// + public void ResetUserStatistics(ResetUserStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/ResetUserStatistics", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Attempts to resolve a dispute with the original order's payment provider. + /// + public void ResolvePurchaseDispute(ResolvePurchaseDisputeRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/ResolvePurchaseDispute", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Revoke all active bans for a user. + /// + public void RevokeAllBansForUser(RevokeAllBansForUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/RevokeAllBansForUser", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Revoke all active bans specified with BanId. + /// + public void RevokeBans(RevokeBansRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/RevokeBans", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Revokes access to an item in a user's inventory + /// + public void RevokeInventoryItem(RevokeInventoryItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/RevokeInventoryItem", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Revokes access for up to 25 items across multiple users and characters. + /// + public void RevokeInventoryItems(RevokeInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/RevokeInventoryItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Run a task immediately regardless of its schedule. + /// + public void RunTask(RunTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/RunTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Forces an email to be sent to the registered email address for the user's account, with a link allowing the user to + /// change the password.If an account recovery email template ID is provided, an email using the custom email template will + /// be used. + /// + public void SendAccountRecoveryEmail(SendAccountRecoveryEmailRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/SendAccountRecoveryEmail", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates the catalog configuration of all virtual goods for the specified catalog version + /// + public void SetCatalogItems(UpdateCatalogItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/SetCatalogItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Sets or resets the player's secret. Player secrets are used to sign API requests. + /// + public void SetPlayerSecret(SetPlayerSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/SetPlayerSecret", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Sets the currently published revision of a title Cloud Script + /// + public void SetPublishedRevision(SetPublishedRevisionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/SetPublishedRevision", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the key-value store of custom publisher settings + /// + public void SetPublisherData(SetPublisherDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/SetPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Sets all the items in one virtual store + /// + public void SetStoreItems(UpdateStoreItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/SetStoreItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates and updates the key-value store of custom title settings which can be read by the client + /// + public void SetTitleData(SetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/SetTitleData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Set and delete key-value pairs in a title data override instance. + /// + public void SetTitleDataAndOverrides(SetTitleDataAndOverridesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/SetTitleDataAndOverrides", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the key-value store of custom title settings which cannot be read by the client + /// + public void SetTitleInternalData(SetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/SetTitleInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Sets the Amazon Resource Name (ARN) for iOS and Android push notifications. Documentation on the exact restrictions can + /// be found at: http://docs.aws.amazon.com/sns/latest/api/API_CreatePlatformApplication.html. Currently, Amazon device + /// Messaging is not supported. + /// + public void SetupPushNotification(SetupPushNotificationRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/SetupPushNotification", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Decrements the specified virtual currency by the stated amount + /// + public void SubtractUserVirtualCurrency(SubtractUserVirtualCurrencyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/SubtractUserVirtualCurrency", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates information of a list of existing bans specified with Ban Ids. + /// + public void UpdateBans(UpdateBansRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateBans", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the catalog configuration for virtual goods in the specified catalog version + /// + public void UpdateCatalogItems(UpdateCatalogItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateCatalogItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates a new Cloud Script revision and uploads source code to it. Note that at this time, only one file should be + /// submitted in the revision. + /// + public void UpdateCloudScript(UpdateCloudScriptRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateCloudScript", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Modifies data and credentials for an existing relationship between a title and an Open ID Connect provider + /// + public void UpdateOpenIdConnection(UpdateOpenIdConnectionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateOpenIdConnection", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates a existing Player Shared Secret Key. It may take up to 5 minutes for this update to become generally available + /// after this API returns. + /// + public void UpdatePlayerSharedSecret(UpdatePlayerSharedSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdatePlayerSharedSecret", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates a player statistic configuration for the title, optionally allowing the developer to specify a reset interval. + /// + public void UpdatePlayerStatisticDefinition(UpdatePlayerStatisticDefinitionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdatePlayerStatisticDefinition", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Changes a policy for a title + /// + public void UpdatePolicy(UpdatePolicyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdatePolicy", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the random drop table configuration for the title + /// + public void UpdateRandomResultTables(UpdateRandomResultTablesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateRandomResultTables", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates an existing player segment and its associated definition(s) and action(s) for a title. + /// + public void UpdateSegment(UpdateSegmentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateSegment", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates an existing virtual item store with new or modified items + /// + public void UpdateStoreItems(UpdateStoreItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateStoreItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Update an existing task. + /// + public void UpdateTask(UpdateTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the title-specific custom data for the user which is readable and writable by the client + /// + public void UpdateUserData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateUserData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the title-specific custom data for the user which cannot be accessed by the client + /// + public void UpdateUserInternalData(UpdateUserInternalDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateUserInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the publisher-specific custom data for the user which is readable and writable by the client + /// + public void UpdateUserPublisherData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateUserPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the publisher-specific custom data for the user which cannot be accessed by the client + /// + public void UpdateUserPublisherInternalData(UpdateUserInternalDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateUserPublisherInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the publisher-specific custom data for the user which can only be read by the client + /// + public void UpdateUserPublisherReadOnlyData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateUserPublisherReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the title-specific custom data for the user which can only be read by the client + /// + public void UpdateUserReadOnlyData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateUserReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the title specific display name for a user + /// + public void UpdateUserTitleDisplayName(UpdateUserTitleDisplayNameRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateUserTitleDisplayName", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Admin/PlayFabAdminInstanceAPI.cs.meta b/Assets/PlayFabSDK/Admin/PlayFabAdminInstanceAPI.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..dfaa93b4c30eb7d324e227b8496835ce4662efae --- /dev/null +++ b/Assets/PlayFabSDK/Admin/PlayFabAdminInstanceAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 942c3c5d808dfed49b4c4369cc282d49 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Admin/PlayFabAdminModels.cs b/Assets/PlayFabSDK/Admin/PlayFabAdminModels.cs new file mode 100644 index 0000000000000000000000000000000000000000..a84dd41ffbdc0570f8facaddaa3f466b95cb2621 --- /dev/null +++ b/Assets/PlayFabSDK/Admin/PlayFabAdminModels.cs @@ -0,0 +1,7387 @@ +#if ENABLE_PLAYFABADMIN_API +using System; +using System.Collections.Generic; +using PlayFab.SharedModels; + +namespace PlayFab.AdminModels +{ + /// + /// If the task instance has already completed, there will be no-op. + /// + [Serializable] + public class AbortTaskInstanceRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// ID of a task instance that is being aborted. + /// + public string TaskInstanceId; + } + + [Serializable] + public class ActionsOnPlayersInSegmentTaskParameter : PlayFabBaseModel + { + /// + /// ID of the action to perform on each player in segment. + /// + public string ActionId; + /// + /// ID of the segment to perform actions on. + /// + public string SegmentId; + } + + [Serializable] + public class ActionsOnPlayersInSegmentTaskSummary : PlayFabBaseModel + { + /// + /// UTC timestamp when the task completed. + /// + public DateTime? CompletedAt; + /// + /// Error message for last processing attempt, if an error occured. + /// + public string ErrorMessage; + /// + /// Flag indicating if the error was fatal, if false job will be retried. + /// + public bool? ErrorWasFatal; + /// + /// Estimated time remaining in seconds. + /// + public double? EstimatedSecondsRemaining; + /// + /// Progress represented as percentage. + /// + public double? PercentComplete; + /// + /// If manually scheduled, ID of user who scheduled the task. + /// + public string ScheduledByUserId; + /// + /// UTC timestamp when the task started. + /// + public DateTime StartedAt; + /// + /// Current status of the task instance. + /// + public TaskInstanceStatus? Status; + /// + /// Identifier of the task this instance belongs to. + /// + public NameIdentifier TaskIdentifier; + /// + /// ID of the task instance. + /// + public string TaskInstanceId; + /// + /// Total players in segment when task was started. + /// + public int? TotalPlayersInSegment; + /// + /// Total number of players that have had the actions applied to. + /// + public int? TotalPlayersProcessed; + } + + [Serializable] + public class AdCampaignAttribution : PlayFabBaseModel + { + /// + /// UTC time stamp of attribution + /// + public DateTime AttributedAt; + /// + /// Attribution campaign identifier + /// + public string CampaignId; + /// + /// Attribution network name + /// + public string Platform; + } + + [Serializable] + public class AdCampaignAttributionModel : PlayFabBaseModel + { + /// + /// UTC time stamp of attribution + /// + public DateTime AttributedAt; + /// + /// Attribution campaign identifier + /// + public string CampaignId; + /// + /// Attribution network name + /// + public string Platform; + } + + [Serializable] + public class AdCampaignSegmentFilter : PlayFabBaseModel + { + /// + /// Campaign id. + /// + public string CampaignId; + /// + /// Campaign source. + /// + public string CampaignSource; + /// + /// Campaign comparison. + /// + public SegmentFilterComparison? Comparison; + } + + [Serializable] + public class AddLocalizedNewsRequest : PlayFabRequestCommon + { + /// + /// Localized body text of the news. + /// + public string Body; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Language of the news item. + /// + public string Language; + /// + /// Unique id of the updated news item. + /// + public string NewsId; + /// + /// Localized title (headline) of the news item. + /// + public string Title; + } + + [Serializable] + public class AddLocalizedNewsResult : PlayFabResultCommon + { + } + + [Serializable] + public class AddNewsRequest : PlayFabRequestCommon + { + /// + /// Default body text of the news. + /// + public string Body; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Time this news was published. If not set, defaults to now. + /// + public DateTime? Timestamp; + /// + /// Default title (headline) of the news item. + /// + public string Title; + } + + [Serializable] + public class AddNewsResult : PlayFabResultCommon + { + /// + /// Unique id of the new news item + /// + public string NewsId; + } + + /// + /// This API will trigger a player_tag_added event and add a tag with the given TagName and PlayFabID to the corresponding + /// player profile. TagName can be used for segmentation and it is limited to 256 characters. Also there is a limit on the + /// number of tags a title can have. + /// + [Serializable] + public class AddPlayerTagRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Unique tag for player profile. + /// + public string TagName; + } + + [Serializable] + public class AddPlayerTagResult : PlayFabResultCommon + { + } + + [Serializable] + public class AddServerBuildRequest : PlayFabRequestCommon + { + /// + /// server host regions in which this build should be running and available + /// + public List ActiveRegions; + /// + /// unique identifier for the build executable + /// + public string BuildId; + /// + /// appended to the end of the command line when starting game servers + /// + public string CommandLineTemplate; + /// + /// developer comment(s) for this build + /// + public string Comment; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// path to the game server executable. Defaults to gameserver.exe + /// + public string ExecutablePath; + /// + /// maximum number of game server instances that can run on a single host machine + /// + public int MaxGamesPerHost; + /// + /// minimum capacity of additional game server instances that can be started before the autoscaling service starts new host + /// machines (given the number of current running host machines and game server instances) + /// + public int MinFreeGameSlots; + } + + [Serializable] + public class AddServerBuildResult : PlayFabResultCommon + { + /// + /// array of regions where this build can used, when it is active + /// + public List ActiveRegions; + /// + /// unique identifier for this build executable + /// + public string BuildId; + /// + /// appended to the end of the command line when starting game servers + /// + public string CommandLineTemplate; + /// + /// developer comment(s) for this build + /// + public string Comment; + /// + /// path to the game server executable. Defaults to gameserver.exe + /// + public string ExecutablePath; + /// + /// maximum number of game server instances that can run on a single host machine + /// + public int MaxGamesPerHost; + /// + /// minimum capacity of additional game server instances that can be started before the autoscaling service starts new host + /// machines (given the number of current running host machines and game server instances) + /// + public int MinFreeGameSlots; + /// + /// the current status of the build validation and processing steps + /// + public GameBuildStatus? Status; + /// + /// time this build was last modified (or uploaded, if this build has never been modified) + /// + public DateTime Timestamp; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + } + + [Serializable] + public class AddUserVirtualCurrencyRequest : PlayFabRequestCommon + { + /// + /// Amount to be added to the user balance of the specified virtual currency. Maximum VC balance is Int32 (2,147,483,647). + /// Any increase over this value will be discarded. + /// + public int Amount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// PlayFab unique identifier of the user whose virtual currency balance is to be increased. + /// + public string PlayFabId; + /// + /// Name of the virtual currency which is to be incremented. + /// + public string VirtualCurrency; + } + + /// + /// This operation is additive. Any new currencies defined in the array will be added to the set of those available for the + /// title, while any CurrencyCode identifiers matching existing ones in the game will be overwritten with the new values. + /// + [Serializable] + public class AddVirtualCurrencyTypesRequest : PlayFabRequestCommon + { + /// + /// List of virtual currencies and their initial deposits (the amount a user is granted when signing in for the first time) + /// to the title + /// + public List VirtualCurrencies; + } + + [Serializable] + public class AllPlayersSegmentFilter : PlayFabBaseModel + { + } + + [Serializable] + public class ApiCondition : PlayFabBaseModel + { + /// + /// Require that API calls contain an RSA encrypted payload or signed headers. + /// + public Conditionals? HasSignatureOrEncryption; + } + + public enum AuthTokenType + { + Email + } + + /// + /// Contains information for a ban. + /// + [Serializable] + public class BanInfo : PlayFabBaseModel + { + /// + /// The active state of this ban. Expired bans may still have this value set to true but they will have no effect. + /// + public bool Active; + /// + /// The unique Ban Id associated with this ban. + /// + public string BanId; + /// + /// The time when this ban was applied. + /// + public DateTime? Created; + /// + /// The time when this ban expires. Permanent bans do not have expiration date. + /// + public DateTime? Expires; + /// + /// The IP address on which the ban was applied. May affect multiple players. + /// + public string IPAddress; + /// + /// The MAC address on which the ban was applied. May affect multiple players. + /// + public string MACAddress; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// The reason why this ban was applied. + /// + public string Reason; + } + + [Serializable] + public class BanPlayerSegmentAction : PlayFabBaseModel + { + /// + /// Ban hours duration. + /// + public uint? BanHours; + /// + /// Reason for ban. + /// + public string ReasonForBan; + } + + /// + /// Represents a single ban request. + /// + [Serializable] + public class BanRequest : PlayFabBaseModel + { + /// + /// The duration in hours for the ban. Leave this blank for a permanent ban. + /// + public uint? DurationInHours; + /// + /// IP address to be banned. May affect multiple players. + /// + public string IPAddress; + /// + /// MAC address to be banned. May affect multiple players. + /// + public string MACAddress; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// The reason for this ban. Maximum 140 characters. + /// + public string Reason; + } + + /// + /// The existence of each user will not be verified. When banning by IP or MAC address, multiple players may be affected, so + /// use this feature with caution. Returns information about the new bans. + /// + [Serializable] + public class BanUsersRequest : PlayFabRequestCommon + { + /// + /// List of ban requests to be applied. Maximum 100. + /// + public List Bans; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class BanUsersResult : PlayFabResultCommon + { + /// + /// Information on the bans that were applied + /// + public List BanData; + } + + [Serializable] + public class BlankResult : PlayFabResultCommon + { + } + + /// + /// A purchasable item from the item catalog + /// + [Serializable] + public class CatalogItem : PlayFabBaseModel + { + /// + /// defines the bundle properties for the item - bundles are items which contain other items, including random drop tables + /// and virtual currencies + /// + public CatalogItemBundleInfo Bundle; + /// + /// if true, then an item instance of this type can be used to grant a character to a user. + /// + public bool CanBecomeCharacter; + /// + /// catalog version for this item + /// + public string CatalogVersion; + /// + /// defines the consumable properties (number of uses, timeout) for the item + /// + public CatalogItemConsumableInfo Consumable; + /// + /// defines the container properties for the item - what items it contains, including random drop tables and virtual + /// currencies, and what item (if any) is required to open it via the UnlockContainerItem API + /// + public CatalogItemContainerInfo Container; + /// + /// game specific custom data + /// + public string CustomData; + /// + /// text description of item, to show in-game + /// + public string Description; + /// + /// text name for the item, to show in-game + /// + public string DisplayName; + /// + /// If the item has IsLImitedEdition set to true, and this is the first time this ItemId has been defined as a limited + /// edition item, this value determines the total number of instances to allocate for the title. Once this limit has been + /// reached, no more instances of this ItemId can be created, and attempts to purchase or grant it will return a Result of + /// false for that ItemId. If the item has already been defined to have a limited edition count, or if this value is less + /// than zero, it will be ignored. + /// + public int InitialLimitedEditionCount; + /// + /// BETA: If true, then only a fixed number can ever be granted. + /// + public bool IsLimitedEdition; + /// + /// if true, then only one item instance of this type will exist and its remaininguses will be incremented instead. + /// RemainingUses will cap out at Int32.Max (2,147,483,647). All subsequent increases will be discarded + /// + public bool IsStackable; + /// + /// if true, then an item instance of this type can be traded between players using the trading APIs + /// + public bool IsTradable; + /// + /// class to which the item belongs + /// + public string ItemClass; + /// + /// unique identifier for this item + /// + public string ItemId; + /// + /// URL to the item image. For Facebook purchase to display the image on the item purchase page, this must be set to an HTTP + /// URL. + /// + public string ItemImageUrl; + /// + /// override prices for this item for specific currencies + /// + public Dictionary RealCurrencyPrices; + /// + /// list of item tags + /// + public List Tags; + /// + /// price of this item in virtual currencies and "RM" (the base Real Money purchase price, in USD pennies) + /// + public Dictionary VirtualCurrencyPrices; + } + + [Serializable] + public class CatalogItemBundleInfo : PlayFabBaseModel + { + /// + /// unique ItemId values for all items which will be added to the player inventory when the bundle is added + /// + public List BundledItems; + /// + /// unique TableId values for all RandomResultTable objects which are part of the bundle (random tables will be resolved and + /// add the relevant items to the player inventory when the bundle is added) + /// + public List BundledResultTables; + /// + /// virtual currency types and balances which will be added to the player inventory when the bundle is added + /// + public Dictionary BundledVirtualCurrencies; + } + + [Serializable] + public class CatalogItemConsumableInfo : PlayFabBaseModel + { + /// + /// number of times this object can be used, after which it will be removed from the player inventory + /// + public uint? UsageCount; + /// + /// duration in seconds for how long the item will remain in the player inventory - once elapsed, the item will be removed + /// (recommended minimum value is 5 seconds, as lower values can cause the item to expire before operations depending on + /// this item's details have completed) + /// + public uint? UsagePeriod; + /// + /// all inventory item instances in the player inventory sharing a non-null UsagePeriodGroup have their UsagePeriod values + /// added together, and share the result - when that period has elapsed, all the items in the group will be removed + /// + public string UsagePeriodGroup; + } + + /// + /// Containers are inventory items that can hold other items defined in the catalog, as well as virtual currency, which is + /// added to the player inventory when the container is unlocked, using the UnlockContainerItem API. The items can be + /// anything defined in the catalog, as well as RandomResultTable objects which will be resolved when the container is + /// unlocked. Containers and their keys should be defined as Consumable (having a limited number of uses) in their catalog + /// defintiions, unless the intent is for the player to be able to re-use them infinitely. + /// + [Serializable] + public class CatalogItemContainerInfo : PlayFabBaseModel + { + /// + /// unique ItemId values for all items which will be added to the player inventory, once the container has been unlocked + /// + public List ItemContents; + /// + /// ItemId for the catalog item used to unlock the container, if any (if not specified, a call to UnlockContainerItem will + /// open the container, adding the contents to the player inventory and currency balances) + /// + public string KeyItemId; + /// + /// unique TableId values for all RandomResultTable objects which are part of the container (once unlocked, random tables + /// will be resolved and add the relevant items to the player inventory) + /// + public List ResultTableContents; + /// + /// virtual currency types and balances which will be added to the player inventory when the container is unlocked + /// + public Dictionary VirtualCurrencyContents; + } + + /// + /// This returns the total number of these items available. + /// + [Serializable] + public class CheckLimitedEditionItemAvailabilityRequest : PlayFabRequestCommon + { + /// + /// Which catalog is being updated. If null, uses the default catalog. + /// + public string CatalogVersion; + /// + /// The item to check for. + /// + public string ItemId; + } + + [Serializable] + public class CheckLimitedEditionItemAvailabilityResult : PlayFabResultCommon + { + /// + /// The amount of the specified resource remaining. + /// + public int Amount; + } + + [Serializable] + public class CloudScriptFile : PlayFabBaseModel + { + /// + /// Contents of the Cloud Script javascript. Must be string-escaped javascript. + /// + public string FileContents; + /// + /// Name of the javascript file. These names are not used internally by the server, they are only for developer + /// organizational purposes. + /// + public string Filename; + } + + [Serializable] + public class CloudScriptTaskParameter : PlayFabBaseModel + { + /// + /// Argument to pass to the CloudScript function. + /// + public object Argument; + /// + /// Name of the CloudScript function to execute. + /// + public string FunctionName; + } + + [Serializable] + public class CloudScriptTaskSummary : PlayFabBaseModel + { + /// + /// UTC timestamp when the task completed. + /// + public DateTime? CompletedAt; + /// + /// Estimated time remaining in seconds. + /// + public double? EstimatedSecondsRemaining; + /// + /// Progress represented as percentage. + /// + public double? PercentComplete; + /// + /// Result of CloudScript execution + /// + public ExecuteCloudScriptResult Result; + /// + /// If manually scheduled, ID of user who scheduled the task. + /// + public string ScheduledByUserId; + /// + /// UTC timestamp when the task started. + /// + public DateTime StartedAt; + /// + /// Current status of the task instance. + /// + public TaskInstanceStatus? Status; + /// + /// Identifier of the task this instance belongs to. + /// + public NameIdentifier TaskIdentifier; + /// + /// ID of the task instance. + /// + public string TaskInstanceId; + } + + [Serializable] + public class CloudScriptVersionStatus : PlayFabBaseModel + { + /// + /// Most recent revision for this Cloud Script version + /// + public int LatestRevision; + /// + /// Published code revision for this Cloud Script version + /// + public int PublishedRevision; + /// + /// Version number + /// + public int Version; + } + + public enum Conditionals + { + Any, + True, + False + } + + [Serializable] + public class ContactEmailInfo : PlayFabBaseModel + { + /// + /// The email address + /// + public string EmailAddress; + /// + /// The name of the email info data + /// + public string Name; + /// + /// The verification status of the email + /// + public EmailVerificationStatus? VerificationStatus; + } + + [Serializable] + public class ContactEmailInfoModel : PlayFabBaseModel + { + /// + /// The email address + /// + public string EmailAddress; + /// + /// The name of the email info data + /// + public string Name; + /// + /// The verification status of the email + /// + public EmailVerificationStatus? VerificationStatus; + } + + [Serializable] + public class ContentInfo : PlayFabBaseModel + { + /// + /// Key of the content + /// + public string Key; + /// + /// Last modified time + /// + public DateTime LastModified; + /// + /// Size of the content in bytes + /// + public double Size; + } + + public enum ContinentCode + { + AF, + AN, + AS, + EU, + NA, + OC, + SA + } + + public enum CountryCode + { + AF, + AX, + AL, + DZ, + AS, + AD, + AO, + AI, + AQ, + AG, + AR, + AM, + AW, + AU, + AT, + AZ, + BS, + BH, + BD, + BB, + BY, + BE, + BZ, + BJ, + BM, + BT, + BO, + BQ, + BA, + BW, + BV, + BR, + IO, + BN, + BG, + BF, + BI, + KH, + CM, + CA, + CV, + KY, + CF, + TD, + CL, + CN, + CX, + CC, + CO, + KM, + CG, + CD, + CK, + CR, + CI, + HR, + CU, + CW, + CY, + CZ, + DK, + DJ, + DM, + DO, + EC, + EG, + SV, + GQ, + ER, + EE, + ET, + FK, + FO, + FJ, + FI, + FR, + GF, + PF, + TF, + GA, + GM, + GE, + DE, + GH, + GI, + GR, + GL, + GD, + GP, + GU, + GT, + GG, + GN, + GW, + GY, + HT, + HM, + VA, + HN, + HK, + HU, + IS, + IN, + ID, + IR, + IQ, + IE, + IM, + IL, + IT, + JM, + JP, + JE, + JO, + KZ, + KE, + KI, + KP, + KR, + KW, + KG, + LA, + LV, + LB, + LS, + LR, + LY, + LI, + LT, + LU, + MO, + MK, + MG, + MW, + MY, + MV, + ML, + MT, + MH, + MQ, + MR, + MU, + YT, + MX, + FM, + MD, + MC, + MN, + ME, + MS, + MA, + MZ, + MM, + NA, + NR, + NP, + NL, + NC, + NZ, + NI, + NE, + NG, + NU, + NF, + MP, + NO, + OM, + PK, + PW, + PS, + PA, + PG, + PY, + PE, + PH, + PN, + PL, + PT, + PR, + QA, + RE, + RO, + RU, + RW, + BL, + SH, + KN, + LC, + MF, + PM, + VC, + WS, + SM, + ST, + SA, + SN, + RS, + SC, + SL, + SG, + SX, + SK, + SI, + SB, + SO, + ZA, + GS, + SS, + ES, + LK, + SD, + SR, + SJ, + SZ, + SE, + CH, + SY, + TW, + TJ, + TZ, + TH, + TL, + TG, + TK, + TO, + TT, + TN, + TR, + TM, + TC, + TV, + UG, + UA, + AE, + GB, + US, + UM, + UY, + UZ, + VU, + VE, + VN, + VG, + VI, + WF, + EH, + YE, + ZM, + ZW + } + + /// + /// Task name is unique within a title. Using a task name that's already taken will cause a name conflict error. Too many + /// create-task requests within a short time will cause a create conflict error. + /// + [Serializable] + public class CreateActionsOnPlayerSegmentTaskRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Description the task + /// + public string Description; + /// + /// Whether the schedule is active. Inactive schedule will not trigger task execution. + /// + public bool IsActive; + /// + /// Name of the task. This is a unique identifier for tasks in the title. + /// + public string Name; + /// + /// Task details related to segment and action + /// + public ActionsOnPlayersInSegmentTaskParameter Parameter; + /// + /// Cron expression for the run schedule of the task. The expression should be in UTC. + /// + public string Schedule; + } + + /// + /// Task name is unique within a title. Using a task name that's already taken will cause a name conflict error. Too many + /// create-task requests within a short time will cause a create conflict error. + /// + [Serializable] + public class CreateCloudScriptTaskRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Description the task + /// + public string Description; + /// + /// Whether the schedule is active. Inactive schedule will not trigger task execution. + /// + public bool IsActive; + /// + /// Name of the task. This is a unique identifier for tasks in the title. + /// + public string Name; + /// + /// Task details related to CloudScript + /// + public CloudScriptTaskParameter Parameter; + /// + /// Cron expression for the run schedule of the task. The expression should be in UTC. + /// + public string Schedule; + } + + /// + /// Task name is unique within a title. Using a task name that's already taken will cause a name conflict error. Too many + /// create-task requests within a short time will cause a create conflict error. + /// + [Serializable] + public class CreateInsightsScheduledScalingTaskRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Description the task + /// + public string Description; + /// + /// Whether the schedule is active. Inactive schedule will not trigger task execution. + /// + public bool IsActive; + /// + /// Name of the task. This is a unique identifier for tasks in the title. + /// + public string Name; + /// + /// Task details related to Insights Scaling + /// + public InsightsScalingTaskParameter Parameter; + /// + /// Cron expression for the run schedule of the task. The expression should be in UTC. + /// + public string Schedule; + } + + [Serializable] + public class CreateOpenIdConnectionRequest : PlayFabRequestCommon + { + /// + /// The client ID given by the ID provider. + /// + public string ClientId; + /// + /// The client secret given by the ID provider. + /// + public string ClientSecret; + /// + /// A name for the connection that identifies it within the title. + /// + public string ConnectionId; + /// + /// Ignore 'nonce' claim in identity tokens. + /// + public bool? IgnoreNonce; + /// + /// The discovery document URL to read issuer information from. This must be the absolute URL to the JSON OpenId + /// Configuration document and must be accessible from the internet. If you don't know it, try your issuer URL followed by + /// "/.well-known/openid-configuration". For example, if the issuer is https://example.com, try + /// https://example.com/.well-known/openid-configuration + /// + public string IssuerDiscoveryUrl; + /// + /// Manually specified information for an OpenID Connect issuer. + /// + public OpenIdIssuerInformation IssuerInformation; + } + + /// + /// Player Shared Secret Keys are used for the call to Client/GetTitlePublicKey, which exchanges the shared secret for an + /// RSA CSP blob to be used to encrypt the payload of account creation requests when that API requires a signature header. + /// + [Serializable] + public class CreatePlayerSharedSecretRequest : PlayFabRequestCommon + { + /// + /// Friendly name for this key + /// + public string FriendlyName; + } + + [Serializable] + public class CreatePlayerSharedSecretResult : PlayFabResultCommon + { + /// + /// The player shared secret to use when calling Client/GetTitlePublicKey + /// + public string SecretKey; + } + + /// + /// Statistics are numeric values, with each statistic in the title also generating a leaderboard. The ResetInterval enables + /// automatically resetting leaderboards on a specified interval. Upon reset, the statistic updates to a new version with no + /// values (effectively removing all players from the leaderboard). The previous version's statistic values are also + /// archived for retrieval, if needed (see GetPlayerStatisticVersions). Statistics not created via a call to + /// CreatePlayerStatisticDefinition by default have a VersionChangeInterval of Never, meaning they do not reset on a + /// schedule, but they can be set to do so via a call to UpdatePlayerStatisticDefinition. Once a statistic has been reset + /// (sometimes referred to as versioned or incremented), the now-previous version can still be written to for up a short, + /// pre-defined period (currently 10 seconds), to prevent issues with levels completing around the time of the reset. Also, + /// once reset, the historical statistics for players in the title may be retrieved using the URL specified in the version + /// information (GetPlayerStatisticVersions). The AggregationMethod determines what action is taken when a new statistic + /// value is submitted - always update with the new value (Last), use the highest of the old and new values (Max), use the + /// smallest (Min), or add them together (Sum). + /// + [Serializable] + public class CreatePlayerStatisticDefinitionRequest : PlayFabRequestCommon + { + /// + /// the aggregation method to use in updating the statistic (defaults to last) + /// + public StatisticAggregationMethod? AggregationMethod; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// unique name of the statistic + /// + public string StatisticName; + /// + /// interval at which the values of the statistic for all players are reset (resets begin at the next interval boundary) + /// + public StatisticResetIntervalOption? VersionChangeInterval; + } + + [Serializable] + public class CreatePlayerStatisticDefinitionResult : PlayFabResultCommon + { + /// + /// created statistic definition + /// + public PlayerStatisticDefinition Statistic; + } + + /// + /// Send all the segment details part of CreateSegmentRequest + /// + [Serializable] + public class CreateSegmentRequest : PlayFabRequestCommon + { + /// + /// Segment model with all of the segment properties data. + /// + public SegmentModel SegmentModel; + } + + [Serializable] + public class CreateSegmentResponse : PlayFabResultCommon + { + /// + /// Error message. + /// + public string ErrorMessage; + /// + /// Segment id. + /// + public string SegmentId; + } + + [Serializable] + public class CreateTaskResult : PlayFabResultCommon + { + /// + /// ID of the task + /// + public string TaskId; + } + + public enum Currency + { + AED, + AFN, + ALL, + AMD, + ANG, + AOA, + ARS, + AUD, + AWG, + AZN, + BAM, + BBD, + BDT, + BGN, + BHD, + BIF, + BMD, + BND, + BOB, + BRL, + BSD, + BTN, + BWP, + BYR, + BZD, + CAD, + CDF, + CHF, + CLP, + CNY, + COP, + CRC, + CUC, + CUP, + CVE, + CZK, + DJF, + DKK, + DOP, + DZD, + EGP, + ERN, + ETB, + EUR, + FJD, + FKP, + GBP, + GEL, + GGP, + GHS, + GIP, + GMD, + GNF, + GTQ, + GYD, + HKD, + HNL, + HRK, + HTG, + HUF, + IDR, + ILS, + IMP, + INR, + IQD, + IRR, + ISK, + JEP, + JMD, + JOD, + JPY, + KES, + KGS, + KHR, + KMF, + KPW, + KRW, + KWD, + KYD, + KZT, + LAK, + LBP, + LKR, + LRD, + LSL, + LYD, + MAD, + MDL, + MGA, + MKD, + MMK, + MNT, + MOP, + MRO, + MUR, + MVR, + MWK, + MXN, + MYR, + MZN, + NAD, + NGN, + NIO, + NOK, + NPR, + NZD, + OMR, + PAB, + PEN, + PGK, + PHP, + PKR, + PLN, + PYG, + QAR, + RON, + RSD, + RUB, + RWF, + SAR, + SBD, + SCR, + SDG, + SEK, + SGD, + SHP, + SLL, + SOS, + SPL, + SRD, + STD, + SVC, + SYP, + SZL, + THB, + TJS, + TMT, + TND, + TOP, + TRY, + TTD, + TVD, + TWD, + TZS, + UAH, + UGX, + USD, + UYU, + UZS, + VEF, + VND, + VUV, + WST, + XAF, + XCD, + XDR, + XOF, + XPF, + YER, + ZAR, + ZMW, + ZWD + } + + [Serializable] + public class DeleteContentRequest : PlayFabRequestCommon + { + /// + /// Key of the content item to be deleted + /// + public string Key; + } + + /// + /// Deletes all data associated with the master player account, including data from all titles the player has played, such + /// as statistics, custom data, inventory, purchases, virtual currency balances, characters, group memberships, publisher + /// data, credential data, account linkages, friends list and PlayStream event history. Removes the player from all + /// leaderboards and player search indexes. Note, this API queues the player for deletion and returns a receipt immediately. + /// Record the receipt ID for future reference. It may take some time before all player data is fully deleted. Upon + /// completion of the deletion, an email will be sent to the notification email address configured for the title confirming + /// the deletion. Until the player data is fully deleted, attempts to recreate the player with the same user account in the + /// same title will fail with the 'AccountDeleted' error. It is highly recommended to know the impact of the deletion by + /// calling GetPlayedTitleList, before calling this API. + /// + [Serializable] + public class DeleteMasterPlayerAccountRequest : PlayFabRequestCommon + { + /// + /// Developer created string to identify a user without PlayFab ID + /// + public string MetaData; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class DeleteMasterPlayerAccountResult : PlayFabResultCommon + { + /// + /// A notification email with this job receipt Id will be sent to the title notification email address when deletion is + /// complete. + /// + public string JobReceiptId; + /// + /// List of titles from which the player's data will be deleted. + /// + public List TitleIds; + } + + [Serializable] + public class DeleteOpenIdConnectionRequest : PlayFabRequestCommon + { + /// + /// unique name of the connection + /// + public string ConnectionId; + } + + /// + /// Deletes all data associated with the player, including statistics, custom data, inventory, purchases, virtual currency + /// balances, characters and shared group memberships. Removes the player from all leaderboards and player search indexes. + /// Does not delete PlayStream event history associated with the player. Does not delete the publisher user account that + /// created the player in the title nor associated data such as username, password, email address, account linkages, or + /// friends list. Note, this API queues the player for deletion and returns immediately. It may take several minutes or more + /// before all player data is fully deleted. Until the player data is fully deleted, attempts to recreate the player with + /// the same user account in the same title will fail with the 'AccountDeleted' error. + /// + [Serializable] + public class DeletePlayerRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class DeletePlayerResult : PlayFabResultCommon + { + } + + [Serializable] + public class DeletePlayerSegmentAction : PlayFabBaseModel + { + } + + /// + /// Player Shared Secret Keys are used for the call to Client/GetTitlePublicKey, which exchanges the shared secret for an + /// RSA CSP blob to be used to encrypt the payload of account creation requests when that API requires a signature header. + /// + [Serializable] + public class DeletePlayerSharedSecretRequest : PlayFabRequestCommon + { + /// + /// The shared secret key to delete + /// + public string SecretKey; + } + + [Serializable] + public class DeletePlayerSharedSecretResult : PlayFabResultCommon + { + } + + [Serializable] + public class DeletePlayerStatisticSegmentAction : PlayFabBaseModel + { + /// + /// Statistic name. + /// + public string StatisticName; + } + + /// + /// Send segment id planning to delete part of DeleteSegmentRequest object + /// + [Serializable] + public class DeleteSegmentRequest : PlayFabRequestCommon + { + /// + /// Segment id. + /// + public string SegmentId; + } + + [Serializable] + public class DeleteSegmentsResponse : PlayFabResultCommon + { + /// + /// Error message. + /// + public string ErrorMessage; + } + + /// + /// This non-reversible operation will permanently delete the requested store. + /// + [Serializable] + public class DeleteStoreRequest : PlayFabRequestCommon + { + /// + /// catalog version of the store to delete. If null, uses the default catalog. + /// + public string CatalogVersion; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// unqiue identifier for the store which is to be deleted + /// + public string StoreId; + } + + [Serializable] + public class DeleteStoreResult : PlayFabResultCommon + { + } + + /// + /// After a task is deleted, for tracking purposes, the task instances belonging to this task will still remain. They will + /// become orphaned and does not belongs to any task. Executions of any in-progress task instances will continue. If the + /// task specified does not exist, the deletion is considered a success. + /// + [Serializable] + public class DeleteTaskRequest : PlayFabRequestCommon + { + /// + /// Specify either the task ID or the name of task to be deleted. + /// + public NameIdentifier Identifier; + } + + /// + /// Will delete all the title data associated with the given override label. + /// + [Serializable] + public class DeleteTitleDataOverrideRequest : PlayFabRequestCommon + { + /// + /// Name of the override. + /// + public string OverrideLabel; + } + + [Serializable] + public class DeleteTitleDataOverrideResult : PlayFabResultCommon + { + } + + /// + /// Deletes all data associated with the title, including catalog, virtual currencies, leaderboard statistics, Cloud Script + /// revisions, segment definitions, event rules, tasks, add-ons, secret keys, data encryption keys, and permission policies. + /// Removes the title from its studio and removes all associated developer roles and permissions. Does not delete PlayStream + /// event history associated with the title. Note, this API queues the title for deletion and returns immediately. It may + /// take several hours or more before all title data is fully deleted. All player accounts in the title must be deleted + /// before deleting the title. If any player accounts exist, the API will return a 'TitleContainsUserAccounts' error. Until + /// the title data is fully deleted, attempts to call APIs with the title will fail with the 'TitleDeleted' error. + /// + [Serializable] + public class DeleteTitleRequest : PlayFabRequestCommon + { + } + + [Serializable] + public class DeleteTitleResult : PlayFabResultCommon + { + } + + public enum EffectType + { + Allow, + Deny + } + + [Serializable] + public class EmailNotificationSegmentAction : PlayFabBaseModel + { + /// + /// Email template id. + /// + public string EmailTemplateId; + /// + /// Email template name. + /// + public string EmailTemplateName; + } + + public enum EmailVerificationStatus + { + Unverified, + Pending, + Confirmed + } + + [Serializable] + public class EmptyResponse : PlayFabResultCommon + { + } + + /// + /// Combined entity type and ID structure which uniquely identifies a single entity. + /// + [Serializable] + public class EntityKey : PlayFabBaseModel + { + /// + /// Unique ID of the entity. + /// + public string Id; + /// + /// Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types + /// + public string Type; + } + + [Serializable] + public class ExecuteAzureFunctionSegmentAction : PlayFabBaseModel + { + /// + /// Azure function. + /// + public string AzureFunction; + /// + /// Azure function parameter. + /// + public object FunctionParameter; + /// + /// Generate play stream event. + /// + public bool GenerateFunctionExecutedEvents; + } + + [Serializable] + public class ExecuteCloudScriptResult : PlayFabBaseModel + { + /// + /// Number of PlayFab API requests issued by the CloudScript function + /// + public int APIRequestsIssued; + /// + /// Information about the error, if any, that occurred during execution + /// + public ScriptExecutionError Error; + public double ExecutionTimeSeconds; + /// + /// The name of the function that executed + /// + public string FunctionName; + /// + /// The object returned from the CloudScript function, if any + /// + public object FunctionResult; + /// + /// Flag indicating if the FunctionResult was too large and was subsequently dropped from this event. This only occurs if + /// the total event size is larger than 350KB. + /// + public bool? FunctionResultTooLarge; + /// + /// Number of external HTTP requests issued by the CloudScript function + /// + public int HttpRequestsIssued; + /// + /// Entries logged during the function execution. These include both entries logged in the function code using log.info() + /// and log.error() and error entries for API and HTTP request failures. + /// + public List Logs; + /// + /// Flag indicating if the logs were too large and were subsequently dropped from this event. This only occurs if the total + /// event size is larger than 350KB after the FunctionResult was removed. + /// + public bool? LogsTooLarge; + public uint MemoryConsumedBytes; + /// + /// Processor time consumed while executing the function. This does not include time spent waiting on API calls or HTTP + /// requests. + /// + public double ProcessorTimeSeconds; + /// + /// The revision of the CloudScript that executed + /// + public int Revision; + } + + [Serializable] + public class ExecuteCloudScriptSegmentAction : PlayFabBaseModel + { + /// + /// Cloud script function. + /// + public string CloudScriptFunction; + /// + /// Generate play stream event. + /// + public bool CloudScriptPublishResultsToPlayStream; + /// + /// Cloud script function parameter. + /// + public object FunctionParameter; + /// + /// Cloud script function parameter json text. + /// + public string FunctionParameterJson; + } + + /// + /// Exports all data associated with the master player account, including data from all titles the player has played, such + /// as statistics, custom data, inventory, purchases, virtual currency balances, characters, group memberships, publisher + /// data, credential data, account linkages, friends list and PlayStream event history. Note, this API queues the player for + /// export and returns a receipt immediately. Record the receipt ID for future reference. It may take some time before the + /// export is available for download. Upon completion of the export, an email containing the URL to download the export dump + /// will be sent to the notification email address configured for the title. + /// + [Serializable] + public class ExportMasterPlayerDataRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class ExportMasterPlayerDataResult : PlayFabResultCommon + { + /// + /// An email with this job receipt Id containing the export download link will be sent to the title notification email + /// address when the export is complete. + /// + public string JobReceiptId; + } + + [Serializable] + public class FirstLoginDateSegmentFilter : PlayFabBaseModel + { + /// + /// First player login date comparison. + /// + public SegmentFilterComparison? Comparison; + /// + /// First player login date. + /// + public DateTime LogInDate; + } + + [Serializable] + public class FirstLoginTimespanSegmentFilter : PlayFabBaseModel + { + /// + /// First player login duration comparison. + /// + public SegmentFilterComparison? Comparison; + /// + /// First player login duration. + /// + public double DurationInMinutes; + } + + public enum GameBuildStatus + { + Available, + Validating, + InvalidBuildPackage, + Processing, + FailedToProcess + } + + [Serializable] + public class GameModeInfo : PlayFabBaseModel + { + /// + /// specific game mode type + /// + public string Gamemode; + /// + /// maximum user count a specific Game Server Instance can support + /// + public uint MaxPlayerCount; + /// + /// minimum user count required for this Game Server Instance to continue (usually 1) + /// + public uint MinPlayerCount; + /// + /// whether to start as an open session, meaning that players can matchmake into it (defaults to true) + /// + public bool? StartOpen; + } + + public enum GenericErrorCodes + { + Success, + UnkownError, + InvalidParams, + AccountNotFound, + AccountBanned, + InvalidUsernameOrPassword, + InvalidTitleId, + InvalidEmailAddress, + EmailAddressNotAvailable, + InvalidUsername, + InvalidPassword, + UsernameNotAvailable, + InvalidSteamTicket, + AccountAlreadyLinked, + LinkedAccountAlreadyClaimed, + InvalidFacebookToken, + AccountNotLinked, + FailedByPaymentProvider, + CouponCodeNotFound, + InvalidContainerItem, + ContainerNotOwned, + KeyNotOwned, + InvalidItemIdInTable, + InvalidReceipt, + ReceiptAlreadyUsed, + ReceiptCancelled, + GameNotFound, + GameModeNotFound, + InvalidGoogleToken, + UserIsNotPartOfDeveloper, + InvalidTitleForDeveloper, + TitleNameConflicts, + UserisNotValid, + ValueAlreadyExists, + BuildNotFound, + PlayerNotInGame, + InvalidTicket, + InvalidDeveloper, + InvalidOrderInfo, + RegistrationIncomplete, + InvalidPlatform, + UnknownError, + SteamApplicationNotOwned, + WrongSteamAccount, + TitleNotActivated, + RegistrationSessionNotFound, + NoSuchMod, + FileNotFound, + DuplicateEmail, + ItemNotFound, + ItemNotOwned, + ItemNotRecycleable, + ItemNotAffordable, + InvalidVirtualCurrency, + WrongVirtualCurrency, + WrongPrice, + NonPositiveValue, + InvalidRegion, + RegionAtCapacity, + ServerFailedToStart, + NameNotAvailable, + InsufficientFunds, + InvalidDeviceID, + InvalidPushNotificationToken, + NoRemainingUses, + InvalidPaymentProvider, + PurchaseInitializationFailure, + DuplicateUsername, + InvalidBuyerInfo, + NoGameModeParamsSet, + BodyTooLarge, + ReservedWordInBody, + InvalidTypeInBody, + InvalidRequest, + ReservedEventName, + InvalidUserStatistics, + NotAuthenticated, + StreamAlreadyExists, + ErrorCreatingStream, + StreamNotFound, + InvalidAccount, + PurchaseDoesNotExist, + InvalidPurchaseTransactionStatus, + APINotEnabledForGameClientAccess, + NoPushNotificationARNForTitle, + BuildAlreadyExists, + BuildPackageDoesNotExist, + CustomAnalyticsEventsNotEnabledForTitle, + InvalidSharedGroupId, + NotAuthorized, + MissingTitleGoogleProperties, + InvalidItemProperties, + InvalidPSNAuthCode, + InvalidItemId, + PushNotEnabledForAccount, + PushServiceError, + ReceiptDoesNotContainInAppItems, + ReceiptContainsMultipleInAppItems, + InvalidBundleID, + JavascriptException, + InvalidSessionTicket, + UnableToConnectToDatabase, + InternalServerError, + InvalidReportDate, + ReportNotAvailable, + DatabaseThroughputExceeded, + InvalidGameTicket, + ExpiredGameTicket, + GameTicketDoesNotMatchLobby, + LinkedDeviceAlreadyClaimed, + DeviceAlreadyLinked, + DeviceNotLinked, + PartialFailure, + PublisherNotSet, + ServiceUnavailable, + VersionNotFound, + RevisionNotFound, + InvalidPublisherId, + DownstreamServiceUnavailable, + APINotIncludedInTitleUsageTier, + DAULimitExceeded, + APIRequestLimitExceeded, + InvalidAPIEndpoint, + BuildNotAvailable, + ConcurrentEditError, + ContentNotFound, + CharacterNotFound, + CloudScriptNotFound, + ContentQuotaExceeded, + InvalidCharacterStatistics, + PhotonNotEnabledForTitle, + PhotonApplicationNotFound, + PhotonApplicationNotAssociatedWithTitle, + InvalidEmailOrPassword, + FacebookAPIError, + InvalidContentType, + KeyLengthExceeded, + DataLengthExceeded, + TooManyKeys, + FreeTierCannotHaveVirtualCurrency, + MissingAmazonSharedKey, + AmazonValidationError, + InvalidPSNIssuerId, + PSNInaccessible, + ExpiredAuthToken, + FailedToGetEntitlements, + FailedToConsumeEntitlement, + TradeAcceptingUserNotAllowed, + TradeInventoryItemIsAssignedToCharacter, + TradeInventoryItemIsBundle, + TradeStatusNotValidForCancelling, + TradeStatusNotValidForAccepting, + TradeDoesNotExist, + TradeCancelled, + TradeAlreadyFilled, + TradeWaitForStatusTimeout, + TradeInventoryItemExpired, + TradeMissingOfferedAndAcceptedItems, + TradeAcceptedItemIsBundle, + TradeAcceptedItemIsStackable, + TradeInventoryItemInvalidStatus, + TradeAcceptedCatalogItemInvalid, + TradeAllowedUsersInvalid, + TradeInventoryItemDoesNotExist, + TradeInventoryItemIsConsumed, + TradeInventoryItemIsStackable, + TradeAcceptedItemsMismatch, + InvalidKongregateToken, + FeatureNotConfiguredForTitle, + NoMatchingCatalogItemForReceipt, + InvalidCurrencyCode, + NoRealMoneyPriceForCatalogItem, + TradeInventoryItemIsNotTradable, + TradeAcceptedCatalogItemIsNotTradable, + UsersAlreadyFriends, + LinkedIdentifierAlreadyClaimed, + CustomIdNotLinked, + TotalDataSizeExceeded, + DeleteKeyConflict, + InvalidXboxLiveToken, + ExpiredXboxLiveToken, + ResettableStatisticVersionRequired, + NotAuthorizedByTitle, + NoPartnerEnabled, + InvalidPartnerResponse, + APINotEnabledForGameServerAccess, + StatisticNotFound, + StatisticNameConflict, + StatisticVersionClosedForWrites, + StatisticVersionInvalid, + APIClientRequestRateLimitExceeded, + InvalidJSONContent, + InvalidDropTable, + StatisticVersionAlreadyIncrementedForScheduledInterval, + StatisticCountLimitExceeded, + StatisticVersionIncrementRateExceeded, + ContainerKeyInvalid, + CloudScriptExecutionTimeLimitExceeded, + NoWritePermissionsForEvent, + CloudScriptFunctionArgumentSizeExceeded, + CloudScriptAPIRequestCountExceeded, + CloudScriptAPIRequestError, + CloudScriptHTTPRequestError, + InsufficientGuildRole, + GuildNotFound, + OverLimit, + EventNotFound, + InvalidEventField, + InvalidEventName, + CatalogNotConfigured, + OperationNotSupportedForPlatform, + SegmentNotFound, + StoreNotFound, + InvalidStatisticName, + TitleNotQualifiedForLimit, + InvalidServiceLimitLevel, + ServiceLimitLevelInTransition, + CouponAlreadyRedeemed, + GameServerBuildSizeLimitExceeded, + GameServerBuildCountLimitExceeded, + VirtualCurrencyCountLimitExceeded, + VirtualCurrencyCodeExists, + TitleNewsItemCountLimitExceeded, + InvalidTwitchToken, + TwitchResponseError, + ProfaneDisplayName, + UserAlreadyAdded, + InvalidVirtualCurrencyCode, + VirtualCurrencyCannotBeDeleted, + IdentifierAlreadyClaimed, + IdentifierNotLinked, + InvalidContinuationToken, + ExpiredContinuationToken, + InvalidSegment, + InvalidSessionId, + SessionLogNotFound, + InvalidSearchTerm, + TwoFactorAuthenticationTokenRequired, + GameServerHostCountLimitExceeded, + PlayerTagCountLimitExceeded, + RequestAlreadyRunning, + ActionGroupNotFound, + MaximumSegmentBulkActionJobsRunning, + NoActionsOnPlayersInSegmentJob, + DuplicateStatisticName, + ScheduledTaskNameConflict, + ScheduledTaskCreateConflict, + InvalidScheduledTaskName, + InvalidTaskSchedule, + SteamNotEnabledForTitle, + LimitNotAnUpgradeOption, + NoSecretKeyEnabledForCloudScript, + TaskNotFound, + TaskInstanceNotFound, + InvalidIdentityProviderId, + MisconfiguredIdentityProvider, + InvalidScheduledTaskType, + BillingInformationRequired, + LimitedEditionItemUnavailable, + InvalidAdPlacementAndReward, + AllAdPlacementViewsAlreadyConsumed, + GoogleOAuthNotConfiguredForTitle, + GoogleOAuthError, + UserNotFriend, + InvalidSignature, + InvalidPublicKey, + GoogleOAuthNoIdTokenIncludedInResponse, + StatisticUpdateInProgress, + LeaderboardVersionNotAvailable, + StatisticAlreadyHasPrizeTable, + PrizeTableHasOverlappingRanks, + PrizeTableHasMissingRanks, + PrizeTableRankStartsAtZero, + InvalidStatistic, + ExpressionParseFailure, + ExpressionInvokeFailure, + ExpressionTooLong, + DataUpdateRateExceeded, + RestrictedEmailDomain, + EncryptionKeyDisabled, + EncryptionKeyMissing, + EncryptionKeyBroken, + NoSharedSecretKeyConfigured, + SecretKeyNotFound, + PlayerSecretAlreadyConfigured, + APIRequestsDisabledForTitle, + InvalidSharedSecretKey, + PrizeTableHasNoRanks, + ProfileDoesNotExist, + ContentS3OriginBucketNotConfigured, + InvalidEnvironmentForReceipt, + EncryptedRequestNotAllowed, + SignedRequestNotAllowed, + RequestViewConstraintParamsNotAllowed, + BadPartnerConfiguration, + XboxBPCertificateFailure, + XboxXASSExchangeFailure, + InvalidEntityId, + StatisticValueAggregationOverflow, + EmailMessageFromAddressIsMissing, + EmailMessageToAddressIsMissing, + SmtpServerAuthenticationError, + SmtpServerLimitExceeded, + SmtpServerInsufficientStorage, + SmtpServerCommunicationError, + SmtpServerGeneralFailure, + EmailClientTimeout, + EmailClientCanceledTask, + EmailTemplateMissing, + InvalidHostForTitleId, + EmailConfirmationTokenDoesNotExist, + EmailConfirmationTokenExpired, + AccountDeleted, + PlayerSecretNotConfigured, + InvalidSignatureTime, + NoContactEmailAddressFound, + InvalidAuthToken, + AuthTokenDoesNotExist, + AuthTokenExpired, + AuthTokenAlreadyUsedToResetPassword, + MembershipNameTooLong, + MembershipNotFound, + GoogleServiceAccountInvalid, + GoogleServiceAccountParseFailure, + EntityTokenMissing, + EntityTokenInvalid, + EntityTokenExpired, + EntityTokenRevoked, + InvalidProductForSubscription, + XboxInaccessible, + SubscriptionAlreadyTaken, + SmtpAddonNotEnabled, + APIConcurrentRequestLimitExceeded, + XboxRejectedXSTSExchangeRequest, + VariableNotDefined, + TemplateVersionNotDefined, + FileTooLarge, + TitleDeleted, + TitleContainsUserAccounts, + TitleDeletionPlayerCleanupFailure, + EntityFileOperationPending, + NoEntityFileOperationPending, + EntityProfileVersionMismatch, + TemplateVersionTooOld, + MembershipDefinitionInUse, + PaymentPageNotConfigured, + FailedLoginAttemptRateLimitExceeded, + EntityBlockedByGroup, + RoleDoesNotExist, + EntityIsAlreadyMember, + DuplicateRoleId, + GroupInvitationNotFound, + GroupApplicationNotFound, + OutstandingInvitationAcceptedInstead, + OutstandingApplicationAcceptedInstead, + RoleIsGroupDefaultMember, + RoleIsGroupAdmin, + RoleNameNotAvailable, + GroupNameNotAvailable, + EmailReportAlreadySent, + EmailReportRecipientBlacklisted, + EventNamespaceNotAllowed, + EventEntityNotAllowed, + InvalidEntityType, + NullTokenResultFromAad, + InvalidTokenResultFromAad, + NoValidCertificateForAad, + InvalidCertificateForAad, + DuplicateDropTableId, + MultiplayerServerError, + MultiplayerServerTooManyRequests, + MultiplayerServerNoContent, + MultiplayerServerBadRequest, + MultiplayerServerUnauthorized, + MultiplayerServerForbidden, + MultiplayerServerNotFound, + MultiplayerServerConflict, + MultiplayerServerInternalServerError, + MultiplayerServerUnavailable, + ExplicitContentDetected, + PIIContentDetected, + InvalidScheduledTaskParameter, + PerEntityEventRateLimitExceeded, + TitleDefaultLanguageNotSet, + EmailTemplateMissingDefaultVersion, + FacebookInstantGamesIdNotLinked, + InvalidFacebookInstantGamesSignature, + FacebookInstantGamesAuthNotConfiguredForTitle, + EntityProfileConstraintValidationFailed, + TelemetryIngestionKeyPending, + TelemetryIngestionKeyNotFound, + StatisticChildNameInvalid, + DataIntegrityError, + VirtualCurrencyCannotBeSetToOlderVersion, + VirtualCurrencyMustBeWithinIntegerRange, + EmailTemplateInvalidSyntax, + EmailTemplateMissingCallback, + PushNotificationTemplateInvalidPayload, + InvalidLocalizedPushNotificationLanguage, + MissingLocalizedPushNotificationMessage, + PushNotificationTemplateMissingPlatformPayload, + PushNotificationTemplatePayloadContainsInvalidJson, + PushNotificationTemplateContainsInvalidIosPayload, + PushNotificationTemplateContainsInvalidAndroidPayload, + PushNotificationTemplateIosPayloadMissingNotificationBody, + PushNotificationTemplateAndroidPayloadMissingNotificationBody, + PushNotificationTemplateNotFound, + PushNotificationTemplateMissingDefaultVersion, + PushNotificationTemplateInvalidSyntax, + PushNotificationTemplateNoCustomPayloadForV1, + NoLeaderboardForStatistic, + TitleNewsMissingDefaultLanguage, + TitleNewsNotFound, + TitleNewsDuplicateLanguage, + TitleNewsMissingTitleOrBody, + TitleNewsInvalidLanguage, + EmailRecipientBlacklisted, + InvalidGameCenterAuthRequest, + GameCenterAuthenticationFailed, + CannotEnablePartiesForTitle, + PartyError, + PartyRequests, + PartyNoContent, + PartyBadRequest, + PartyUnauthorized, + PartyForbidden, + PartyNotFound, + PartyConflict, + PartyInternalServerError, + PartyUnavailable, + PartyTooManyRequests, + PushNotificationTemplateMissingName, + CannotEnableMultiplayerServersForTitle, + WriteAttemptedDuringExport, + MultiplayerServerTitleQuotaCoresExceeded, + AutomationRuleNotFound, + EntityAPIKeyLimitExceeded, + EntityAPIKeyNotFound, + EntityAPIKeyOrSecretInvalid, + EconomyServiceUnavailable, + EconomyServiceInternalError, + QueryRateLimitExceeded, + EntityAPIKeyCreationDisabledForEntity, + ForbiddenByEntityPolicy, + UpdateInventoryRateLimitExceeded, + StudioCreationRateLimited, + StudioCreationInProgress, + DuplicateStudioName, + StudioNotFound, + StudioDeleted, + StudioDeactivated, + StudioActivated, + TitleCreationRateLimited, + TitleCreationInProgress, + DuplicateTitleName, + TitleActivationRateLimited, + TitleActivationInProgress, + TitleDeactivated, + TitleActivated, + CloudScriptAzureFunctionsExecutionTimeLimitExceeded, + CloudScriptAzureFunctionsArgumentSizeExceeded, + CloudScriptAzureFunctionsReturnSizeExceeded, + CloudScriptAzureFunctionsHTTPRequestError, + VirtualCurrencyBetaGetError, + VirtualCurrencyBetaCreateError, + VirtualCurrencyBetaInitialDepositSaveError, + VirtualCurrencyBetaSaveError, + VirtualCurrencyBetaDeleteError, + VirtualCurrencyBetaRestoreError, + VirtualCurrencyBetaSaveConflict, + VirtualCurrencyBetaUpdateError, + InsightsManagementDatabaseNotFound, + InsightsManagementOperationNotFound, + InsightsManagementErrorPendingOperationExists, + InsightsManagementSetPerformanceLevelInvalidParameter, + InsightsManagementSetStorageRetentionInvalidParameter, + InsightsManagementGetStorageUsageInvalidParameter, + InsightsManagementGetOperationStatusInvalidParameter, + DuplicatePurchaseTransactionId, + EvaluationModePlayerCountExceeded, + GetPlayersInSegmentRateLimitExceeded, + CloudScriptFunctionNameSizeExceeded, + PaidInsightsFeaturesNotEnabled, + CloudScriptAzureFunctionsQueueRequestError, + EvaluationModeTitleCountExceeded, + InsightsManagementTitleNotInFlight, + LimitNotFound, + LimitNotAvailableViaAPI, + InsightsManagementSetStorageRetentionBelowMinimum, + InsightsManagementSetStorageRetentionAboveMaximum, + AppleNotEnabledForTitle, + InsightsManagementNewActiveEventExportLimitInvalid, + InsightsManagementSetPerformanceRateLimited, + PartyRequestsThrottledFromRateLimiter, + XboxServiceTooManyRequests, + NintendoSwitchNotEnabledForTitle, + RequestMultiplayerServersThrottledFromRateLimiter, + TitleDataOverrideNotFound, + DuplicateKeys, + WasNotCreatedWithCloudRoot, + LegacyMultiplayerServersDeprecated, + VirtualCurrencyCurrentlyUnavailable, + SteamUserNotFound, + ElasticSearchOperationFailed, + NotImplemented, + MatchmakingEntityInvalid, + MatchmakingPlayerAttributesInvalid, + MatchmakingQueueNotFound, + MatchmakingMatchNotFound, + MatchmakingTicketNotFound, + MatchmakingAlreadyJoinedTicket, + MatchmakingTicketAlreadyCompleted, + MatchmakingQueueConfigInvalid, + MatchmakingMemberProfileInvalid, + NintendoSwitchDeviceIdNotLinked, + MatchmakingNotEnabled, + MatchmakingPlayerAttributesTooLarge, + MatchmakingNumberOfPlayersInTicketTooLarge, + MatchmakingAttributeInvalid, + MatchmakingPlayerHasNotJoinedTicket, + MatchmakingRateLimitExceeded, + MatchmakingTicketMembershipLimitExceeded, + MatchmakingUnauthorized, + MatchmakingQueueLimitExceeded, + MatchmakingRequestTypeMismatch, + MatchmakingBadRequest, + TitleConfigNotFound, + TitleConfigUpdateConflict, + TitleConfigSerializationError, + CatalogApiNotImplemented, + CatalogEntityInvalid, + CatalogTitleIdMissing, + CatalogPlayerIdMissing, + CatalogClientIdentityInvalid, + CatalogOneOrMoreFilesInvalid, + CatalogItemMetadataInvalid, + CatalogItemIdInvalid, + CatalogSearchParameterInvalid, + CatalogFeatureDisabled, + CatalogConfigInvalid, + CatalogItemTypeInvalid, + CatalogBadRequest, + CatalogTooManyRequests, + ExportInvalidStatusUpdate, + ExportInvalidPrefix, + ExportBlobContainerDoesNotExist, + ExportNotFound, + ExportCouldNotUpdate, + ExportInvalidStorageType, + ExportAmazonBucketDoesNotExist, + ExportInvalidBlobStorage, + ExportKustoException, + ExportKustoConnectionFailed, + ExportUnknownError, + ExportCantEditPendingExport, + ExportLimitExports, + ExportLimitEvents, + ExportInvalidPartitionStatusModification, + ExportCouldNotCreate, + ExportNoBackingDatabaseFound, + ExportCouldNotDelete, + ExportCannotDetermineEventQuery, + ExportInvalidQuerySchemaModification, + ExportQuerySchemaMissingRequiredColumns, + ExportCannotParseQuery, + ExportControlCommandsNotAllowed, + ExportQueryMissingTableReference, + ExplorerBasicInvalidQueryName, + ExplorerBasicInvalidQueryDescription, + ExplorerBasicInvalidQueryConditions, + ExplorerBasicInvalidQueryStartDate, + ExplorerBasicInvalidQueryEndDate, + ExplorerBasicInvalidQueryGroupBy, + ExplorerBasicInvalidQueryAggregateType, + ExplorerBasicInvalidQueryAggregateProperty, + ExplorerBasicLoadQueriesError, + ExplorerBasicLoadQueryError, + ExplorerBasicCreateQueryError, + ExplorerBasicDeleteQueryError, + ExplorerBasicUpdateQueryError, + ExplorerBasicSavedQueriesLimit, + ExplorerBasicSavedQueryNotFound, + TenantShardMapperShardNotFound, + TitleNotEnabledForParty, + PartyVersionNotFound, + MultiplayerServerBuildReferencedByMatchmakingQueue, + MultiplayerServerBuildReferencedByBuildAlias, + ExperimentationExperimentStopped, + ExperimentationExperimentRunning, + ExperimentationExperimentNotFound, + ExperimentationExperimentNeverStarted, + ExperimentationExperimentDeleted, + ExperimentationClientTimeout, + ExperimentationInvalidVariantConfiguration, + ExperimentationInvalidVariableConfiguration, + ExperimentInvalidId, + ExperimentationNoScorecard, + ExperimentationTreatmentAssignmentFailed, + ExperimentationTreatmentAssignmentDisabled, + ExperimentationInvalidDuration, + ExperimentationMaxExperimentsReached, + ExperimentationExperimentSchedulingInProgress, + ExperimentationInvalidEndDate, + ExperimentationInvalidStartDate, + ExperimentationMaxDurationExceeded, + ExperimentationExclusionGroupNotFound, + ExperimentationExclusionGroupInsufficientCapacity, + ExperimentationExclusionGroupCannotDelete, + ExperimentationExclusionGroupInvalidTrafficAllocation, + ExperimentationExclusionGroupInvalidName, + MaxActionDepthExceeded, + TitleNotOnUpdatedPricingPlan, + SegmentManagementTitleNotInFlight, + SegmentManagementNoExpressionTree, + SegmentManagementTriggerActionCountOverLimit, + SegmentManagementSegmentCountOverLimit, + SegmentManagementInvalidSegmentId, + SegmentManagementInvalidInput, + SegmentManagementInvalidSegmentName, + DeleteSegmentRateLimitExceeded, + CreateSegmentRateLimitExceeded, + UpdateSegmentRateLimitExceeded, + GetSegmentsRateLimitExceeded, + AsyncExportNotInFlight, + AsyncExportNotFound, + AsyncExportRateLimitExceeded, + SnapshotNotFound, + InventoryApiNotImplemented, + LobbyDoesNotExist, + LobbyRateLimitExceeded, + LobbyPlayerAlreadyJoined, + LobbyNotJoinable, + LobbyMemberCannotRejoin, + LobbyCurrentPlayersMoreThanMaxPlayers, + LobbyPlayerNotPresent, + LobbyBadRequest, + LobbyPlayerMaxLobbyLimitExceeded, + LobbyNewOwnerMustBeConnected, + LobbyCurrentOwnerStillConnected, + LobbyMemberIsNotOwner, + EventSamplingInvalidRatio, + EventSamplingInvalidEventName, + EventSamplingRatioNotFound + } + + [Serializable] + public class GetActionsOnPlayersInSegmentTaskInstanceResult : PlayFabResultCommon + { + /// + /// Parameter of this task instance + /// + public ActionsOnPlayersInSegmentTaskParameter Parameter; + /// + /// Status summary of the actions-on-players-in-segment task instance + /// + public ActionsOnPlayersInSegmentTaskSummary Summary; + } + + /// + /// Request has no paramaters. + /// + [Serializable] + public class GetAllSegmentsRequest : PlayFabRequestCommon + { + } + + [Serializable] + public class GetAllSegmentsResult : PlayFabResultCommon + { + /// + /// Array of segments for this title. + /// + public List Segments; + } + + [Serializable] + public class GetCatalogItemsRequest : PlayFabRequestCommon + { + /// + /// Which catalog is being requested. If null, uses the default catalog. + /// + public string CatalogVersion; + } + + [Serializable] + public class GetCatalogItemsResult : PlayFabResultCommon + { + /// + /// Array of items which can be purchased. + /// + public List Catalog; + } + + [Serializable] + public class GetCloudScriptRevisionRequest : PlayFabRequestCommon + { + /// + /// Revision number. If left null, defaults to the latest revision + /// + public int? Revision; + /// + /// Version number. If left null, defaults to the latest version + /// + public int? Version; + } + + [Serializable] + public class GetCloudScriptRevisionResult : PlayFabResultCommon + { + /// + /// Time this revision was created + /// + public DateTime CreatedAt; + /// + /// List of Cloud Script files in this revision. + /// + public List Files; + /// + /// True if this is the currently published revision + /// + public bool IsPublished; + /// + /// Revision number. + /// + public int Revision; + /// + /// Version number. + /// + public int Version; + } + + [Serializable] + public class GetCloudScriptTaskInstanceResult : PlayFabResultCommon + { + /// + /// Parameter of this task instance + /// + public CloudScriptTaskParameter Parameter; + /// + /// Status summary of the CloudScript task instance + /// + public CloudScriptTaskSummary Summary; + } + + [Serializable] + public class GetCloudScriptVersionsRequest : PlayFabRequestCommon + { + } + + [Serializable] + public class GetCloudScriptVersionsResult : PlayFabResultCommon + { + /// + /// List of versions + /// + public List Versions; + } + + [Serializable] + public class GetContentListRequest : PlayFabRequestCommon + { + /// + /// Limits the response to keys that begin with the specified prefix. You can use prefixes to list contents under a folder, + /// or for a specified version, etc. + /// + public string Prefix; + } + + [Serializable] + public class GetContentListResult : PlayFabResultCommon + { + /// + /// List of content items. + /// + public List Contents; + /// + /// Number of content items returned. We currently have a maximum of 1000 items limit. + /// + public int ItemCount; + /// + /// The total size of listed contents in bytes. + /// + public uint TotalSize; + } + + [Serializable] + public class GetContentUploadUrlRequest : PlayFabRequestCommon + { + /// + /// A standard MIME type describing the format of the contents. The same MIME type has to be set in the header when + /// uploading the content. If not specified, the MIME type is 'binary/octet-stream' by default. + /// + public string ContentType; + /// + /// Key of the content item to upload, usually formatted as a path, e.g. images/a.png + /// + public string Key; + } + + [Serializable] + public class GetContentUploadUrlResult : PlayFabResultCommon + { + /// + /// URL for uploading content via HTTP PUT method. The URL requires the 'x-ms-blob-type' header to have the value + /// 'BlockBlob'. The URL will expire in approximately one hour. + /// + public string URL; + } + + /// + /// Gets the download URL for the requested report data (in CSV form). The reports available through this API call are those + /// available in the Game Manager, in the Analytics->Reports tab. + /// + [Serializable] + public class GetDataReportRequest : PlayFabRequestCommon + { + /// + /// Reporting year (UTC) + /// + public int Day; + /// + /// Reporting month (UTC) + /// + public int Month; + /// + /// Report name + /// + public string ReportName; + /// + /// Reporting year (UTC) + /// + public int Year; + } + + [Serializable] + public class GetDataReportResult : PlayFabResultCommon + { + /// + /// The URL where the requested report can be downloaded. This can be any PlayFab generated reports. The full list of + /// reports can be found at: https://docs.microsoft.com/en-us/gaming/playfab/features/analytics/reports/quickstart. + /// + public string DownloadUrl; + } + + [Serializable] + public class GetMatchmakerGameInfoRequest : PlayFabRequestCommon + { + /// + /// unique identifier of the lobby for which info is being requested + /// + public string LobbyId; + } + + [Serializable] + public class GetMatchmakerGameInfoResult : PlayFabResultCommon + { + /// + /// version identifier of the game server executable binary being run + /// + public string BuildVersion; + /// + /// time when Game Server Instance is currently scheduled to end + /// + public DateTime? EndTime; + /// + /// unique identifier of the lobby + /// + public string LobbyId; + /// + /// game mode for this Game Server Instance + /// + public string Mode; + /// + /// array of unique PlayFab identifiers for users currently connected to this Game Server Instance + /// + public List Players; + /// + /// region in which the Game Server Instance is running + /// + public Region? Region; + /// + /// IPV4 address of the server + /// + public string ServerIPV4Address; + /// + /// IPV6 address of the server + /// + public string ServerIPV6Address; + /// + /// communication port for this Game Server Instance + /// + public uint ServerPort; + /// + /// Public DNS name (if any) of the server + /// + public string ServerPublicDNSName; + /// + /// time when the Game Server Instance was created + /// + public DateTime StartTime; + /// + /// unique identifier of the Game Server Instance for this lobby + /// + public string TitleId; + } + + /// + /// These details are used by the PlayFab matchmaking service to determine if an existing Game Server Instance has room for + /// additional users, and by the PlayFab game server management service to determine when a new Game Server Host should be + /// created in order to prevent excess load on existing Hosts. + /// + [Serializable] + public class GetMatchmakerGameModesRequest : PlayFabRequestCommon + { + /// + /// previously uploaded build version for which game modes are being requested + /// + public string BuildVersion; + } + + [Serializable] + public class GetMatchmakerGameModesResult : PlayFabResultCommon + { + /// + /// array of game modes available for the specified build + /// + public List GameModes; + } + + /// + /// Useful for identifying titles of which the player's data will be deleted by DeleteMasterPlayer. + /// + [Serializable] + public class GetPlayedTitleListRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetPlayedTitleListResult : PlayFabResultCommon + { + /// + /// List of titles the player has played + /// + public List TitleIds; + } + + /// + /// Gets a player ID from an auth token. The token expires after 30 minutes and cannot be used to look up a player when + /// expired. + /// + [Serializable] + public class GetPlayerIdFromAuthTokenRequest : PlayFabRequestCommon + { + /// + /// The auth token of the player requesting the password reset. + /// + public string Token; + /// + /// The type of auth token of the player requesting the password reset. + /// + public AuthTokenType TokenType; + } + + [Serializable] + public class GetPlayerIdFromAuthTokenResult : PlayFabResultCommon + { + /// + /// The player ID from the token passed in + /// + public string PlayFabId; + } + + /// + /// This API allows for access to details regarding a user in the PlayFab service, usually for purposes of customer support. + /// Note that data returned may be Personally Identifying Information (PII), such as email address, and so care should be + /// taken in how this data is stored and managed. Since this call will always return the relevant information for users who + /// have accessed the title, the recommendation is to not store this data locally. + /// + [Serializable] + public class GetPlayerProfileRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// If non-null, this determines which properties of the resulting player profiles to return. For API calls from the client, + /// only the allowed client profile properties for the title may be requested. These allowed properties are configured in + /// the Game Manager "Client Profile Options" tab in the "Settings" section. + /// + public PlayerProfileViewConstraints ProfileConstraints; + } + + [Serializable] + public class GetPlayerProfileResult : PlayFabResultCommon + { + /// + /// The profile of the player. This profile is not guaranteed to be up-to-date. For a new player, this profile will not + /// exist. + /// + public PlayerProfileModel PlayerProfile; + } + + [Serializable] + public class GetPlayerSegmentsResult : PlayFabResultCommon + { + /// + /// Array of segments the requested player currently belongs to. + /// + public List Segments; + } + + /// + /// Player Shared Secret Keys are used for the call to Client/GetTitlePublicKey, which exchanges the shared secret for an + /// RSA CSP blob to be used to encrypt the payload of account creation requests when that API requires a signature header. + /// + [Serializable] + public class GetPlayerSharedSecretsRequest : PlayFabRequestCommon + { + } + + [Serializable] + public class GetPlayerSharedSecretsResult : PlayFabResultCommon + { + /// + /// The player shared secret to use when calling Client/GetTitlePublicKey + /// + public List SharedSecrets; + } + + /// + /// Initial request must contain at least a Segment ID. Subsequent requests must contain the Segment ID as well as the + /// Continuation Token. Failure to send the Continuation Token will result in a new player segment list being generated. + /// Each time the Continuation Token is passed in the length of the Total Seconds to Live is refreshed. If too much time + /// passes between requests to the point that a subsequent request is past the Total Seconds to Live an error will be + /// returned and paging will be terminated. This API is resource intensive and should not be used in scenarios which might + /// generate high request volumes. Only one request to this API at a time should be made per title. Concurrent requests to + /// the API may be rejected with the APIConcurrentRequestLimitExceeded error. + /// + [Serializable] + public class GetPlayersInSegmentRequest : PlayFabRequestCommon + { + /// + /// Continuation token if retrieving subsequent pages of results. + /// + public string ContinuationToken; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Maximum number of profiles to load. Default is 1,000. Maximum is 10,000. + /// + public uint? MaxBatchSize; + /// + /// Number of seconds to keep the continuation token active. After token expiration it is not possible to continue paging + /// results. Default is 300 (5 minutes). Maximum is 1,800 (30 minutes). + /// + public uint? SecondsToLive; + /// + /// Unique identifier for this segment. + /// + public string SegmentId; + } + + [Serializable] + public class GetPlayersInSegmentResult : PlayFabResultCommon + { + /// + /// Continuation token to use to retrieve subsequent pages of results. If token returns null there are no more results. + /// + public string ContinuationToken; + /// + /// Array of player profiles in this segment. + /// + public List PlayerProfiles; + /// + /// Count of profiles matching this segment. + /// + public int ProfilesInSegment; + } + + [Serializable] + public class GetPlayersSegmentsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetPlayerStatisticDefinitionsRequest : PlayFabRequestCommon + { + } + + /// + /// Statistics are numeric values, with each statistic in the title also generating a leaderboard. The ResetInterval defines + /// the period of time at which the leaderboard for the statistic will automatically reset. Upon reset, the statistic + /// updates to a new version with no values (effectively removing all players from the leaderboard). The previous version's + /// statistic values are also archived for retrieval, if needed (see GetPlayerStatisticVersions). Statistics not created via + /// a call to CreatePlayerStatisticDefinition by default have a VersionChangeInterval of Never, meaning they do not reset on + /// a schedule, but they can be set to do so via a call to UpdatePlayerStatisticDefinition. Once a statistic has been reset + /// (sometimes referred to as versioned or incremented), the previous version can still be written to for up a short, + /// pre-defined period (currently 10 seconds), to prevent issues with levels completing around the time of the reset. Also, + /// once reset, the historical statistics for players in the title may be retrieved using the URL specified in the version + /// information (GetPlayerStatisticVersions). The AggregationMethod defines what action is taken when a new statistic value + /// is submitted - always update with the new value (Last), use the highest of the old and new values (Max), use the + /// smallest (Min), or add them together (Sum). + /// + [Serializable] + public class GetPlayerStatisticDefinitionsResult : PlayFabResultCommon + { + /// + /// the player statistic definitions for the title + /// + public List Statistics; + } + + [Serializable] + public class GetPlayerStatisticVersionsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// unique name of the statistic + /// + public string StatisticName; + } + + /// + /// Statistics are numeric values, with each statistic in the title also generating a leaderboard. The information returned + /// in the results defines the state of a specific version of a statistic, including when it was or will become the + /// currently active version, when it will (or did) become a previous version, and its archival state if it is no longer the + /// active version. For a statistic which has been reset, once the archival status is Complete, the full set of statistics + /// for all players in the leaderboard for that version may be retrieved via the ArchiveDownloadUrl. Statistics which have + /// not been reset (incremented/versioned) will only have a single version which is not scheduled to reset. + /// + [Serializable] + public class GetPlayerStatisticVersionsResult : PlayFabResultCommon + { + /// + /// version change history of the statistic + /// + public List StatisticVersions; + } + + /// + /// This API will return a list of canonical tags which includes both namespace and tag's name. If namespace is not + /// provided, the result is a list of all canonical tags. TagName can be used for segmentation and Namespace is limited to + /// 128 characters. + /// + [Serializable] + public class GetPlayerTagsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Optional namespace to filter results by + /// + public string Namespace; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetPlayerTagsResult : PlayFabResultCommon + { + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Canonical tags (including namespace and tag's name) for the requested user + /// + public List Tags; + } + + /// + /// Views the requested policy. Today, the only supported policy is 'ApiPolicy'. + /// + [Serializable] + public class GetPolicyRequest : PlayFabRequestCommon + { + /// + /// The name of the policy to read. Only supported name is 'ApiPolicy'. + /// + public string PolicyName; + } + + [Serializable] + public class GetPolicyResponse : PlayFabResultCommon + { + /// + /// The name of the policy read. + /// + public string PolicyName; + /// + /// Policy version. + /// + public int PolicyVersion; + /// + /// The statements in the requested policy. + /// + public List Statements; + } + + /// + /// This API is designed to return publisher-specific values which can be read, but not written to, by the client. This data + /// is shared across all titles assigned to a particular publisher, and can be used for cross-game coordination. Only titles + /// assigned to a publisher can use this API. For more information email helloplayfab@microsoft.com. This AdminAPI call for + /// getting title data guarantees no delay in between update and retrieval of newly set data. + /// + [Serializable] + public class GetPublisherDataRequest : PlayFabRequestCommon + { + /// + /// array of keys to get back data from the Publisher data blob, set by the admin tools + /// + public List Keys; + } + + [Serializable] + public class GetPublisherDataResult : PlayFabResultCommon + { + /// + /// a dictionary object of key / value pairs + /// + public Dictionary Data; + } + + [Serializable] + public class GetRandomResultTablesRequest : PlayFabRequestCommon + { + /// + /// catalog version to fetch tables from. Use default catalog version if null + /// + public string CatalogVersion; + } + + [Serializable] + public class GetRandomResultTablesResult : PlayFabResultCommon + { + /// + /// array of random result tables currently available + /// + public Dictionary Tables; + } + + [Serializable] + public class GetSegmentResult : PlayFabBaseModel + { + /// + /// Identifier of the segments AB Test, if it is attached to one. + /// + public string ABTestParent; + /// + /// Unique identifier for this segment. + /// + public string Id; + /// + /// Segment name. + /// + public string Name; + } + + /// + /// Given input segment ids, return list of segments. + /// + [Serializable] + public class GetSegmentsRequest : PlayFabRequestCommon + { + /// + /// Segment ids to filter title segments. + /// + public List SegmentIds; + } + + [Serializable] + public class GetSegmentsResponse : PlayFabResultCommon + { + /// + /// Error message. + /// + public string ErrorMessage; + /// + /// List of title segments. + /// + public List Segments; + } + + [Serializable] + public class GetServerBuildInfoRequest : PlayFabRequestCommon + { + /// + /// unique identifier of the previously uploaded build executable for which information is being requested + /// + public string BuildId; + } + + /// + /// Information about a particular server build + /// + [Serializable] + public class GetServerBuildInfoResult : PlayFabResultCommon + { + /// + /// array of regions where this build can used, when it is active + /// + public List ActiveRegions; + /// + /// unique identifier for this build executable + /// + public string BuildId; + /// + /// developer comment(s) for this build + /// + public string Comment; + /// + /// error message, if any, about this build + /// + public string ErrorMessage; + /// + /// maximum number of game server instances that can run on a single host machine + /// + public int MaxGamesPerHost; + /// + /// minimum capacity of additional game server instances that can be started before the autoscaling service starts new host + /// machines (given the number of current running host machines and game server instances) + /// + public int MinFreeGameSlots; + /// + /// the current status of the build validation and processing steps + /// + public GameBuildStatus? Status; + /// + /// time this build was last modified (or uploaded, if this build has never been modified) + /// + public DateTime Timestamp; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + } + + [Serializable] + public class GetServerBuildUploadURLRequest : PlayFabRequestCommon + { + /// + /// unique identifier of the game server build to upload + /// + public string BuildId; + } + + [Serializable] + public class GetServerBuildUploadURLResult : PlayFabResultCommon + { + /// + /// pre-authorized URL for uploading the game server build package + /// + public string URL; + } + + /// + /// A store contains an array of references to items defined in the catalog, along with the prices for the item, in both + /// real world and virtual currencies. These prices act as an override to any prices defined in the catalog. In this way, + /// the base definitions of the items may be defined in the catalog, with all associated properties, while the pricing can + /// be set for each store, as needed. This allows for subsets of goods to be defined for different purposes (in order to + /// simplify showing some, but not all catalog items to users, based upon different characteristics), along with unique + /// prices. Note that all prices defined in the catalog and store definitions for the item are considered valid, and that a + /// compromised client can be made to send a request for an item based upon any of these definitions. If no price is + /// specified in the store for an item, the price set in the catalog should be displayed to the user. + /// + [Serializable] + public class GetStoreItemsRequest : PlayFabRequestCommon + { + /// + /// Catalog version to store items from. Use default catalog version if null + /// + public string CatalogVersion; + /// + /// Unqiue identifier for the store which is being requested. + /// + public string StoreId; + } + + [Serializable] + public class GetStoreItemsResult : PlayFabResultCommon + { + /// + /// The base catalog that this store is a part of. + /// + public string CatalogVersion; + /// + /// Additional data about the store. + /// + public StoreMarketingModel MarketingData; + /// + /// How the store was last updated (Admin or a third party). + /// + public SourceType? Source; + /// + /// Array of items which can be purchased from this store. + /// + public List Store; + /// + /// The ID of this store. + /// + public string StoreId; + } + + /// + /// The result includes detail information that's specific to a CloudScript task. Only CloudScript tasks configured as "Run + /// Cloud Script function once" will be retrieved. To get a list of task instances by task, status, or time range, use + /// GetTaskInstances. + /// + [Serializable] + public class GetTaskInstanceRequest : PlayFabRequestCommon + { + /// + /// ID of the requested task instance. + /// + public string TaskInstanceId; + } + + /// + /// Only the most recent 100 task instances are returned, ordered by start time descending. The results are generic basic + /// information for task instances. To get detail information specific to each task type, use Get*TaskInstance based on its + /// corresponding task type. + /// + [Serializable] + public class GetTaskInstancesRequest : PlayFabRequestCommon + { + /// + /// Optional range-from filter for task instances' StartedAt timestamp. + /// + public DateTime? StartedAtRangeFrom; + /// + /// Optional range-to filter for task instances' StartedAt timestamp. + /// + public DateTime? StartedAtRangeTo; + /// + /// Optional filter for task instances that are of a specific status. + /// + public TaskInstanceStatus? StatusFilter; + /// + /// Name or ID of the task whose instances are being queried. If not specified, return all task instances that satisfy + /// conditions set by other filters. + /// + public NameIdentifier TaskIdentifier; + } + + [Serializable] + public class GetTaskInstancesResult : PlayFabResultCommon + { + /// + /// Basic status summaries of the queried task instances. Empty If no task instances meets the filter criteria. To get + /// detailed status summary, use Get*TaskInstance API according to task type (e.g. + /// GetActionsOnPlayersInSegmentTaskInstance). + /// + public List Summaries; + } + + [Serializable] + public class GetTasksRequest : PlayFabRequestCommon + { + /// + /// Provide either the task ID or the task name to get a specific task. If not specified, return all defined tasks. + /// + public NameIdentifier Identifier; + } + + [Serializable] + public class GetTasksResult : PlayFabResultCommon + { + /// + /// Result tasks. Empty if there is no task found. + /// + public List Tasks; + } + + /// + /// This API method is designed to return title specific values which can be read by the client. For example, a developer + /// could choose to store values which modify the user experience, such as enemy spawn rates, weapon strengths, movement + /// speeds, etc. This allows a developer to update the title without the need to create, test, and ship a new build. If an + /// override label is specified in the request, the overrides are applied automatically and returned with the title data. + /// Note that due to caching, there may up to a minute delay in between updating title data and a query returning the newest + /// value. + /// + [Serializable] + public class GetTitleDataRequest : PlayFabRequestCommon + { + /// + /// Specific keys to search for in the title data (leave null to get all keys) + /// + public List Keys; + /// + /// Optional field that specifies the name of an override. This value is ignored when used by the game client; otherwise, + /// the overrides are applied automatically to the title data. + /// + public string OverrideLabel; + } + + [Serializable] + public class GetTitleDataResult : PlayFabResultCommon + { + /// + /// a dictionary object of key / value pairs + /// + public Dictionary Data; + } + + /// + /// Get all bans for a user, including inactive and expired bans. + /// + [Serializable] + public class GetUserBansRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetUserBansResult : PlayFabResultCommon + { + /// + /// Information about the bans + /// + public List BanData; + } + + /// + /// Data is stored as JSON key-value pairs. If the Keys parameter is provided, the data object returned will only contain + /// the data specific to the indicated Keys. Otherwise, the full set of custom user data will be returned. + /// + [Serializable] + public class GetUserDataRequest : PlayFabRequestCommon + { + /// + /// The version that currently exists according to the caller. The call will return the data for all of the keys if the + /// version in the system is greater than this. + /// + public uint? IfChangedFromDataVersion; + /// + /// Specific keys to search for in the custom user data. + /// + public List Keys; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetUserDataResult : PlayFabResultCommon + { + /// + /// User specific data for this title. + /// + public Dictionary Data; + /// + /// Indicates the current version of the data that has been set. This is incremented with every set call for that type of + /// data (read-only, internal, etc). This version can be provided in Get calls to find updated data. + /// + public uint DataVersion; + /// + /// PlayFab unique identifier of the user whose custom data is being returned. + /// + public string PlayFabId; + } + + /// + /// All items currently in the user inventory will be returned, irrespective of how they were acquired (via purchasing, + /// grants, coupons, etc.). Items that are expired, fully consumed, or are no longer valid are not considered to be in the + /// user's current inventory, and so will not be not included. + /// + [Serializable] + public class GetUserInventoryRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetUserInventoryResult : PlayFabResultCommon + { + /// + /// Array of inventory items belonging to the user. + /// + public List Inventory; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Array of virtual currency balance(s) belonging to the user. + /// + public Dictionary VirtualCurrency; + /// + /// Array of remaining times and timestamps for virtual currencies. + /// + public Dictionary VirtualCurrencyRechargeTimes; + } + + /// + /// Result of granting an item to a user. Note, to retrieve additional information for an item such as Tags, Description + /// that are the same across all instances of the item, a call to GetCatalogItems is required. The ItemID of can be matched + /// to a catalog entry, which contains the additional information. Also note that Custom Data is only set when the User's + /// specific instance has updated the CustomData via a call to UpdateUserInventoryItemCustomData. Other fields such as + /// UnitPrice and UnitCurrency are only set when the item was granted via a purchase. + /// + [Serializable] + public class GrantedItemInstance : PlayFabBaseModel + { + /// + /// Game specific comment associated with this instance when it was added to the user inventory. + /// + public string Annotation; + /// + /// Array of unique items that were awarded when this catalog item was purchased. + /// + public List BundleContents; + /// + /// Unique identifier for the parent inventory item, as defined in the catalog, for object which were added from a bundle or + /// container. + /// + public string BundleParent; + /// + /// Catalog version for the inventory item, when this instance was created. + /// + public string CatalogVersion; + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// A set of custom key-value pairs on the instance of the inventory item, which is not to be confused with the catalog + /// item's custom data. + /// + public Dictionary CustomData; + /// + /// CatalogItem.DisplayName at the time this item was purchased. + /// + public string DisplayName; + /// + /// Timestamp for when this instance will expire. + /// + public DateTime? Expiration; + /// + /// Class name for the inventory item, as defined in the catalog. + /// + public string ItemClass; + /// + /// Unique identifier for the inventory item, as defined in the catalog. + /// + public string ItemId; + /// + /// Unique item identifier for this specific instance of the item. + /// + public string ItemInstanceId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Timestamp for when this instance was purchased. + /// + public DateTime? PurchaseDate; + /// + /// Total number of remaining uses, if this is a consumable item. + /// + public int? RemainingUses; + /// + /// Result of this operation. + /// + public bool Result; + /// + /// Currency type for the cost of the catalog item. Not available when granting items. + /// + public string UnitCurrency; + /// + /// Cost of the catalog item in the given currency. Not available when granting items. + /// + public uint UnitPrice; + /// + /// The number of uses that were added or removed to this item in this call. + /// + public int? UsesIncrementedBy; + } + + [Serializable] + public class GrantItemSegmentAction : PlayFabBaseModel + { + /// + /// Item catalog id. + /// + public string CatelogId; + /// + /// Item id. + /// + public string ItemId; + /// + /// Item quantity. + /// + public uint Quantity; + } + + /// + /// This function directly adds inventory items to user inventories. As a result of this operations, the user will not be + /// charged any transaction fee, regardless of the inventory item catalog definition. Please note that the processing time + /// for inventory grants and purchases increases fractionally the more items are in the inventory, and the more items are in + /// the grant/purchase operation. + /// + [Serializable] + public class GrantItemsToUsersRequest : PlayFabRequestCommon + { + /// + /// Catalog version from which items are to be granted. + /// + public string CatalogVersion; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Array of items to grant and the users to whom the items are to be granted. + /// + public List ItemGrants; + } + + /// + /// Please note that the order of the items in the response may not match the order of items in the request. + /// + [Serializable] + public class GrantItemsToUsersResult : PlayFabResultCommon + { + /// + /// Array of items granted to users. + /// + public List ItemGrantResults; + } + + [Serializable] + public class GrantVirtualCurrencySegmentAction : PlayFabBaseModel + { + /// + /// Virtual currency amount. + /// + public int Amount; + /// + /// Virtual currency code. + /// + public string CurrencyCode; + } + + /// + /// This operation will increment the global counter for the number of these items available. This number cannot be + /// decremented, except by actual grants. + /// + [Serializable] + public class IncrementLimitedEditionItemAvailabilityRequest : PlayFabRequestCommon + { + /// + /// Amount to increase availability by. + /// + public int Amount; + /// + /// Which catalog is being updated. If null, uses the default catalog. + /// + public string CatalogVersion; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The item which needs more availability. + /// + public string ItemId; + } + + [Serializable] + public class IncrementLimitedEditionItemAvailabilityResult : PlayFabResultCommon + { + } + + [Serializable] + public class IncrementPlayerStatisticSegmentAction : PlayFabBaseModel + { + /// + /// Increment value. + /// + public int IncrementValue; + /// + /// Statistic name. + /// + public string StatisticName; + } + + /// + /// Statistics are numeric values, with each statistic in the title also generating a leaderboard. When this call is made on + /// a given statistic, this forces a reset of that statistic. Upon reset, the statistic updates to a new version with no + /// values (effectively removing all players from the leaderboard). The previous version's statistic values are also + /// archived for retrieval, if needed (see GetPlayerStatisticVersions). Statistics not created via a call to + /// CreatePlayerStatisticDefinition by default have a VersionChangeInterval of Never, meaning they do not reset on a + /// schedule, but they can be set to do so via a call to UpdatePlayerStatisticDefinition. Once a statistic has been reset + /// (sometimes referred to as versioned or incremented), the now-previous version can still be written to for up a short, + /// pre-defined period (currently 10 seconds), to prevent issues with levels completing around the time of the reset. Also, + /// once reset, the historical statistics for players in the title may be retrieved using the URL specified in the version + /// information (GetPlayerStatisticVersions). + /// + [Serializable] + public class IncrementPlayerStatisticVersionRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// unique name of the statistic + /// + public string StatisticName; + } + + [Serializable] + public class IncrementPlayerStatisticVersionResult : PlayFabResultCommon + { + /// + /// version change history of the statistic + /// + public PlayerStatisticVersion StatisticVersion; + } + + [Serializable] + public class InsightsScalingTaskParameter : PlayFabBaseModel + { + /// + /// Insights Performance Level to scale to. + /// + public int Level; + } + + [Serializable] + public class ItemGrant : PlayFabBaseModel + { + /// + /// String detailing any additional information concerning this operation. + /// + public string Annotation; + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// Key-value pairs to be written to the custom data. Note that keys are trimmed of whitespace, are limited in size, and may + /// not begin with a '!' character or be null. + /// + public Dictionary Data; + /// + /// Unique identifier of the catalog item to be granted to the user. + /// + public string ItemId; + /// + /// Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language + /// constraints. Use this to delete the keys directly. + /// + public List KeysToRemove; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + /// + /// A unique instance of an item in a user's inventory. Note, to retrieve additional information for an item such as Tags, + /// Description that are the same across all instances of the item, a call to GetCatalogItems is required. The ItemID of can + /// be matched to a catalog entry, which contains the additional information. Also note that Custom Data is only set when + /// the User's specific instance has updated the CustomData via a call to UpdateUserInventoryItemCustomData. Other fields + /// such as UnitPrice and UnitCurrency are only set when the item was granted via a purchase. + /// + [Serializable] + public class ItemInstance : PlayFabBaseModel + { + /// + /// Game specific comment associated with this instance when it was added to the user inventory. + /// + public string Annotation; + /// + /// Array of unique items that were awarded when this catalog item was purchased. + /// + public List BundleContents; + /// + /// Unique identifier for the parent inventory item, as defined in the catalog, for object which were added from a bundle or + /// container. + /// + public string BundleParent; + /// + /// Catalog version for the inventory item, when this instance was created. + /// + public string CatalogVersion; + /// + /// A set of custom key-value pairs on the instance of the inventory item, which is not to be confused with the catalog + /// item's custom data. + /// + public Dictionary CustomData; + /// + /// CatalogItem.DisplayName at the time this item was purchased. + /// + public string DisplayName; + /// + /// Timestamp for when this instance will expire. + /// + public DateTime? Expiration; + /// + /// Class name for the inventory item, as defined in the catalog. + /// + public string ItemClass; + /// + /// Unique identifier for the inventory item, as defined in the catalog. + /// + public string ItemId; + /// + /// Unique item identifier for this specific instance of the item. + /// + public string ItemInstanceId; + /// + /// Timestamp for when this instance was purchased. + /// + public DateTime? PurchaseDate; + /// + /// Total number of remaining uses, if this is a consumable item. + /// + public int? RemainingUses; + /// + /// Currency type for the cost of the catalog item. Not available when granting items. + /// + public string UnitCurrency; + /// + /// Cost of the catalog item in the given currency. Not available when granting items. + /// + public uint UnitPrice; + /// + /// The number of uses that were added or removed to this item in this call. + /// + public int? UsesIncrementedBy; + } + + [Serializable] + public class LastLoginDateSegmentFilter : PlayFabBaseModel + { + /// + /// Last player login date comparison. + /// + public SegmentFilterComparison? Comparison; + /// + /// Last player login date. + /// + public DateTime LogInDate; + } + + [Serializable] + public class LastLoginTimespanSegmentFilter : PlayFabBaseModel + { + /// + /// Last player login duration comparison. + /// + public SegmentFilterComparison? Comparison; + /// + /// Last player login duration. + /// + public double DurationInMinutes; + } + + [Serializable] + public class LinkedPlatformAccountModel : PlayFabBaseModel + { + /// + /// Linked account email of the user on the platform, if available + /// + public string Email; + /// + /// Authentication platform + /// + public LoginIdentityProvider? Platform; + /// + /// Unique account identifier of the user on the platform + /// + public string PlatformUserId; + /// + /// Linked account username of the user on the platform, if available + /// + public string Username; + } + + [Serializable] + public class LinkedUserAccountHasEmailSegmentFilter : PlayFabBaseModel + { + /// + /// Login provider comparison. + /// + public SegmentFilterComparison? Comparison; + /// + /// Login provider. + /// + public SegmentLoginIdentityProvider? LoginProvider; + } + + [Serializable] + public class LinkedUserAccountSegmentFilter : PlayFabBaseModel + { + /// + /// Login provider. + /// + public SegmentLoginIdentityProvider? LoginProvider; + } + + [Serializable] + public class ListBuildsRequest : PlayFabRequestCommon + { + } + + [Serializable] + public class ListBuildsResult : PlayFabResultCommon + { + /// + /// array of uploaded game server builds + /// + public List Builds; + } + + [Serializable] + public class ListOpenIdConnectionRequest : PlayFabRequestCommon + { + } + + [Serializable] + public class ListOpenIdConnectionResponse : PlayFabResultCommon + { + /// + /// The list of Open ID Connections + /// + public List Connections; + } + + [Serializable] + public class ListVirtualCurrencyTypesRequest : PlayFabRequestCommon + { + } + + [Serializable] + public class ListVirtualCurrencyTypesResult : PlayFabResultCommon + { + /// + /// List of virtual currency names defined for this title + /// + public List VirtualCurrencies; + } + + [Serializable] + public class LocationModel : PlayFabBaseModel + { + /// + /// City name. + /// + public string City; + /// + /// The two-character continent code for this location + /// + public ContinentCode? ContinentCode; + /// + /// The two-character ISO 3166-1 country code for the country associated with the location + /// + public CountryCode? CountryCode; + /// + /// Latitude coordinate of the geographic location. + /// + public double? Latitude; + /// + /// Longitude coordinate of the geographic location. + /// + public double? Longitude; + } + + [Serializable] + public class LocationSegmentFilter : PlayFabBaseModel + { + /// + /// Segment country code. + /// + public SegmentCountryCode? CountryCode; + } + + public enum LoginIdentityProvider + { + Unknown, + PlayFab, + Custom, + GameCenter, + GooglePlay, + Steam, + XBoxLive, + PSN, + Kongregate, + Facebook, + IOSDevice, + AndroidDevice, + Twitch, + WindowsHello, + GameServer, + CustomServer, + NintendoSwitch, + FacebookInstantGames, + OpenIdConnect, + Apple, + NintendoSwitchAccount + } + + [Serializable] + public class LogStatement : PlayFabBaseModel + { + /// + /// Optional object accompanying the message as contextual information + /// + public object Data; + /// + /// 'Debug', 'Info', or 'Error' + /// + public string Level; + public string Message; + } + + /// + /// This API allows for access to details regarding a user in the PlayFab service, usually for purposes of customer support. + /// Note that data returned may be Personally Identifying Information (PII), such as email address, and so care should be + /// taken in how this data is stored and managed. Since this call will always return the relevant information for users who + /// have accessed the title, the recommendation is to not store this data locally. + /// + [Serializable] + public class LookupUserAccountInfoRequest : PlayFabRequestCommon + { + /// + /// User email address attached to their account + /// + public string Email; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Title specific username to match against existing user accounts + /// + public string TitleDisplayName; + /// + /// PlayFab username for the account (3-20 characters) + /// + public string Username; + } + + [Serializable] + public class LookupUserAccountInfoResult : PlayFabResultCommon + { + /// + /// User info for the user matching the request + /// + public UserAccountInfo UserInfo; + } + + [Serializable] + public class MembershipModel : PlayFabBaseModel + { + /// + /// Whether this membership is active. That is, whether the MembershipExpiration time has been reached. + /// + public bool IsActive; + /// + /// The time this membership expires + /// + public DateTime MembershipExpiration; + /// + /// The id of the membership + /// + public string MembershipId; + /// + /// Membership expirations can be explicitly overridden (via game manager or the admin api). If this membership has been + /// overridden, this will be the new expiration time. + /// + public DateTime? OverrideExpiration; + /// + /// The list of subscriptions that this player has for this membership + /// + public List Subscriptions; + } + + /// + /// These details are used by the PlayFab matchmaking service to determine if an existing Game Server Instance has room for + /// additional users, and by the PlayFab game server management service to determine when a new Game Server Host should be + /// created in order to prevent excess load on existing Hosts. This operation is not additive. Using it will cause the game + /// mode definition for the game server executable in question to be created from scratch. If there is an existing game + /// server mode definition for the given BuildVersion, it will be deleted and replaced with the data specified in this call. + /// + [Serializable] + public class ModifyMatchmakerGameModesRequest : PlayFabRequestCommon + { + /// + /// previously uploaded build version for which game modes are being specified + /// + public string BuildVersion; + /// + /// array of game modes (Note: this will replace all game modes for the indicated build version) + /// + public List GameModes; + } + + [Serializable] + public class ModifyMatchmakerGameModesResult : PlayFabResultCommon + { + } + + [Serializable] + public class ModifyServerBuildRequest : PlayFabRequestCommon + { + /// + /// array of regions where this build can used, when it is active + /// + public List ActiveRegions; + /// + /// unique identifier of the previously uploaded build executable to be updated + /// + public string BuildId; + /// + /// appended to the end of the command line when starting game servers + /// + public string CommandLineTemplate; + /// + /// developer comment(s) for this build + /// + public string Comment; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// path to the game server executable. Defaults to gameserver.exe + /// + public string ExecutablePath; + /// + /// maximum number of game server instances that can run on a single host machine + /// + public int MaxGamesPerHost; + /// + /// minimum capacity of additional game server instances that can be started before the autoscaling service starts new host + /// machines (given the number of current running host machines and game server instances) + /// + public int MinFreeGameSlots; + /// + /// new timestamp + /// + public DateTime? Timestamp; + } + + [Serializable] + public class ModifyServerBuildResult : PlayFabResultCommon + { + /// + /// array of regions where this build can used, when it is active + /// + public List ActiveRegions; + /// + /// unique identifier for this build executable + /// + public string BuildId; + /// + /// appended to the end of the command line when starting game servers + /// + public string CommandLineTemplate; + /// + /// developer comment(s) for this build + /// + public string Comment; + /// + /// path to the game server executable. Defaults to gameserver.exe + /// + public string ExecutablePath; + /// + /// maximum number of game server instances that can run on a single host machine + /// + public int MaxGamesPerHost; + /// + /// minimum capacity of additional game server instances that can be started before the autoscaling service starts new host + /// machines (given the number of current running host machines and game server instances) + /// + public int MinFreeGameSlots; + /// + /// the current status of the build validation and processing steps + /// + public GameBuildStatus? Status; + /// + /// time this build was last modified (or uploaded, if this build has never been modified) + /// + public DateTime Timestamp; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + } + + [Serializable] + public class ModifyUserVirtualCurrencyResult : PlayFabResultCommon + { + /// + /// Balance of the virtual currency after modification. + /// + public int Balance; + /// + /// Amount added or subtracted from the user's virtual currency. Maximum VC balance is Int32 (2,147,483,647). Any increase + /// over this value will be discarded. + /// + public int BalanceChange; + /// + /// User currency was subtracted from. + /// + public string PlayFabId; + /// + /// Name of the virtual currency which was modified. + /// + public string VirtualCurrency; + } + + /// + /// Identifier by either name or ID. Note that a name may change due to renaming, or reused after being deleted. ID is + /// immutable and unique. + /// + [Serializable] + public class NameIdentifier : PlayFabBaseModel + { + /// + /// Id Identifier, if present + /// + public string Id; + /// + /// Name Identifier, if present + /// + public string Name; + } + + [Serializable] + public class OpenIdConnection : PlayFabBaseModel + { + /// + /// The client ID given by the ID provider. + /// + public string ClientId; + /// + /// The client secret given by the ID provider. + /// + public string ClientSecret; + /// + /// A name for the connection to identify it within the title. + /// + public string ConnectionId; + /// + /// Shows if data about the connection will be loaded from the issuer's discovery document + /// + public bool DiscoverConfiguration; + /// + /// Information for an OpenID Connect provider. + /// + public OpenIdIssuerInformation IssuerInformation; + } + + [Serializable] + public class OpenIdIssuerInformation : PlayFabBaseModel + { + /// + /// Authorization endpoint URL to direct users to for signin. + /// + public string AuthorizationUrl; + /// + /// The URL of the issuer of the tokens. This must match the exact URL of the issuer field in tokens. + /// + public string Issuer; + /// + /// JSON Web Key Set for validating the signature of tokens. + /// + public object JsonWebKeySet; + /// + /// Token endpoint URL for code verification. + /// + public string TokenUrl; + } + + [Serializable] + public class PermissionStatement : PlayFabBaseModel + { + /// + /// The action this statement effects. The only supported action is 'Execute'. + /// + public string Action; + /// + /// Additional conditions to be applied for API Resources. + /// + public ApiCondition ApiConditions; + /// + /// A comment about the statement. Intended solely for bookkeeping and debugging. + /// + public string Comment; + /// + /// The effect this statement will have. It could be either Allow or Deny + /// + public EffectType Effect; + /// + /// The principal this statement will effect. The only supported principal is '*'. + /// + public string Principal; + /// + /// The resource this statements effects. The only supported resources look like 'pfrn:api--*' for all apis, or + /// 'pfrn:api--/Client/ConfirmPurchase' for specific apis. + /// + public string Resource; + } + + [Serializable] + public class PlayerLinkedAccount : PlayFabBaseModel + { + /// + /// Linked account's email + /// + public string Email; + /// + /// Authentication platform + /// + public LoginIdentityProvider? Platform; + /// + /// Platform user identifier + /// + public string PlatformUserId; + /// + /// Linked account's username + /// + public string Username; + } + + [Serializable] + public class PlayerLocation : PlayFabBaseModel + { + /// + /// City of the player's geographic location. + /// + public string City; + /// + /// The two-character continent code for this location + /// + public ContinentCode ContinentCode; + /// + /// The two-character ISO 3166-1 country code for the country associated with the location + /// + public CountryCode CountryCode; + /// + /// Latitude coordinate of the player's geographic location. + /// + public double? Latitude; + /// + /// Longitude coordinate of the player's geographic location. + /// + public double? Longitude; + } + + [Serializable] + public class PlayerProfile : PlayFabBaseModel + { + /// + /// Array of ad campaigns player has been attributed to + /// + public List AdCampaignAttributions; + /// + /// Image URL of the player's avatar. + /// + public string AvatarUrl; + /// + /// Banned until UTC Date. If permanent ban this is set for 20 years after the original ban date. + /// + public DateTime? BannedUntil; + /// + /// Array of contact email addresses associated with the player + /// + public List ContactEmailAddresses; + /// + /// Player record created + /// + public DateTime? Created; + /// + /// Player Display Name + /// + public string DisplayName; + /// + /// Last login + /// + public DateTime? LastLogin; + /// + /// Array of third party accounts linked to this player + /// + public List LinkedAccounts; + /// + /// Dictionary of player's locations by type. + /// + public Dictionary Locations; + /// + /// Player account origination + /// + public LoginIdentityProvider? Origination; + /// + /// List of player variants for experimentation + /// + public List PlayerExperimentVariants; + /// + /// PlayFab Player ID + /// + public string PlayerId; + /// + /// Array of player statistics + /// + public List PlayerStatistics; + /// + /// Publisher this player belongs to + /// + public string PublisherId; + /// + /// Array of configured push notification end points + /// + public List PushNotificationRegistrations; + /// + /// Dictionary of player's statistics using only the latest version's value + /// + public Dictionary Statistics; + /// + /// List of player's tags for segmentation. + /// + public List Tags; + /// + /// Title ID this profile applies to + /// + public string TitleId; + /// + /// A sum of player's total purchases in USD across all currencies. + /// + public uint? TotalValueToDateInUSD; + /// + /// Dictionary of player's total purchases by currency. + /// + public Dictionary ValuesToDate; + /// + /// Dictionary of player's virtual currency balances + /// + public Dictionary VirtualCurrencyBalances; + } + + [Serializable] + public class PlayerProfileModel : PlayFabBaseModel + { + /// + /// List of advertising campaigns the player has been attributed to + /// + public List AdCampaignAttributions; + /// + /// URL of the player's avatar image + /// + public string AvatarUrl; + /// + /// If the player is currently banned, the UTC Date when the ban expires + /// + public DateTime? BannedUntil; + /// + /// List of all contact email info associated with the player account + /// + public List ContactEmailAddresses; + /// + /// Player record created + /// + public DateTime? Created; + /// + /// Player display name + /// + public string DisplayName; + /// + /// List of experiment variants for the player. Note that these variants are not guaranteed to be up-to-date when returned + /// during login because the player profile is updated only after login. Instead, use the LoginResult.TreatmentAssignment + /// property during login to get the correct variants and variables. + /// + public List ExperimentVariants; + /// + /// UTC time when the player most recently logged in to the title + /// + public DateTime? LastLogin; + /// + /// List of all authentication systems linked to this player account + /// + public List LinkedAccounts; + /// + /// List of geographic locations from which the player has logged in to the title + /// + public List Locations; + /// + /// List of memberships for the player, along with whether are expired. + /// + public List Memberships; + /// + /// Player account origination + /// + public LoginIdentityProvider? Origination; + /// + /// PlayFab player account unique identifier + /// + public string PlayerId; + /// + /// Publisher this player belongs to + /// + public string PublisherId; + /// + /// List of configured end points registered for sending the player push notifications + /// + public List PushNotificationRegistrations; + /// + /// List of leaderboard statistic values for the player + /// + public List Statistics; + /// + /// List of player's tags for segmentation + /// + public List Tags; + /// + /// Title ID this player profile applies to + /// + public string TitleId; + /// + /// Sum of the player's purchases made with real-money currencies, converted to US dollars equivalent and represented as a + /// whole number of cents (1/100 USD). For example, 999 indicates nine dollars and ninety-nine cents. + /// + public uint? TotalValueToDateInUSD; + /// + /// List of the player's lifetime purchase totals, summed by real-money currency + /// + public List ValuesToDate; + } + + [Serializable] + public class PlayerProfileViewConstraints : PlayFabBaseModel + { + /// + /// Whether to show player's avatar URL. Defaults to false + /// + public bool ShowAvatarUrl; + /// + /// Whether to show the banned until time. Defaults to false + /// + public bool ShowBannedUntil; + /// + /// Whether to show campaign attributions. Defaults to false + /// + public bool ShowCampaignAttributions; + /// + /// Whether to show contact email addresses. Defaults to false + /// + public bool ShowContactEmailAddresses; + /// + /// Whether to show the created date. Defaults to false + /// + public bool ShowCreated; + /// + /// Whether to show the display name. Defaults to false + /// + public bool ShowDisplayName; + /// + /// Whether to show player's experiment variants. Defaults to false + /// + public bool ShowExperimentVariants; + /// + /// Whether to show the last login time. Defaults to false + /// + public bool ShowLastLogin; + /// + /// Whether to show the linked accounts. Defaults to false + /// + public bool ShowLinkedAccounts; + /// + /// Whether to show player's locations. Defaults to false + /// + public bool ShowLocations; + /// + /// Whether to show player's membership information. Defaults to false + /// + public bool ShowMemberships; + /// + /// Whether to show origination. Defaults to false + /// + public bool ShowOrigination; + /// + /// Whether to show push notification registrations. Defaults to false + /// + public bool ShowPushNotificationRegistrations; + /// + /// Reserved for future development + /// + public bool ShowStatistics; + /// + /// Whether to show tags. Defaults to false + /// + public bool ShowTags; + /// + /// Whether to show the total value to date in usd. Defaults to false + /// + public bool ShowTotalValueToDateInUsd; + /// + /// Whether to show the values to date. Defaults to false + /// + public bool ShowValuesToDate; + } + + [Serializable] + public class PlayerStatistic : PlayFabBaseModel + { + /// + /// Statistic ID + /// + public string Id; + /// + /// Statistic name + /// + public string Name; + /// + /// Current statistic value + /// + public int StatisticValue; + /// + /// Statistic version (0 if not a versioned statistic) + /// + public int StatisticVersion; + } + + [Serializable] + public class PlayerStatisticDefinition : PlayFabBaseModel + { + /// + /// the aggregation method to use in updating the statistic (defaults to last) + /// + public StatisticAggregationMethod? AggregationMethod; + /// + /// current active version of the statistic, incremented each time the statistic resets + /// + public uint CurrentVersion; + /// + /// unique name of the statistic + /// + public string StatisticName; + /// + /// interval at which the values of the statistic for all players are reset automatically + /// + public StatisticResetIntervalOption? VersionChangeInterval; + } + + [Serializable] + public class PlayerStatisticVersion : PlayFabBaseModel + { + /// + /// time when the statistic version became active + /// + public DateTime ActivationTime; + /// + /// URL for the downloadable archive of player statistic values, if available + /// + public string ArchiveDownloadUrl; + /// + /// time when the statistic version became inactive due to statistic version incrementing + /// + public DateTime? DeactivationTime; + /// + /// time at which the statistic version was scheduled to become active, based on the configured ResetInterval + /// + public DateTime? ScheduledActivationTime; + /// + /// time at which the statistic version was scheduled to become inactive, based on the configured ResetInterval + /// + public DateTime? ScheduledDeactivationTime; + /// + /// name of the statistic when the version became active + /// + public string StatisticName; + /// + /// status of the statistic version + /// + public StatisticVersionStatus? Status; + /// + /// version of the statistic + /// + public uint Version; + } + + public enum PushNotificationPlatform + { + ApplePushNotificationService, + GoogleCloudMessaging + } + + [Serializable] + public class PushNotificationRegistration : PlayFabBaseModel + { + /// + /// Notification configured endpoint + /// + public string NotificationEndpointARN; + /// + /// Push notification platform + /// + public PushNotificationPlatform? Platform; + } + + [Serializable] + public class PushNotificationRegistrationModel : PlayFabBaseModel + { + /// + /// Notification configured endpoint + /// + public string NotificationEndpointARN; + /// + /// Push notification platform + /// + public PushNotificationPlatform? Platform; + } + + [Serializable] + public class PushNotificationSegmentAction : PlayFabBaseModel + { + /// + /// Push notification template id. + /// + public string PushNotificationTemplateId; + } + + [Serializable] + public class PushNotificationSegmentFilter : PlayFabBaseModel + { + /// + /// Push notification device platform. + /// + public SegmentPushNotificationDevicePlatform? PushNotificationDevicePlatform; + } + + public enum PushSetupPlatform + { + GCM, + APNS, + APNS_SANDBOX + } + + [Serializable] + public class RandomResultTable : PlayFabBaseModel + { + /// + /// Child nodes that indicate what kind of drop table item this actually is. + /// + public List Nodes; + /// + /// Unique name for this drop table + /// + public string TableId; + } + + [Serializable] + public class RandomResultTableListing : PlayFabBaseModel + { + /// + /// Catalog version this table is associated with + /// + public string CatalogVersion; + /// + /// Child nodes that indicate what kind of drop table item this actually is. + /// + public List Nodes; + /// + /// Unique name for this drop table + /// + public string TableId; + } + + [Serializable] + public class RefundPurchaseRequest : PlayFabRequestCommon + { + /// + /// Unique order ID for the purchase in question. + /// + public string OrderId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// The Reason parameter should correspond with the payment providers reason field, if they require one such as Facebook. In + /// the case of Facebook this must match one of their refund or dispute resolution enums (See: + /// https://developers.facebook.com/docs/payments/implementation-guide/handling-disputes-refunds) + /// + public string Reason; + } + + [Serializable] + public class RefundPurchaseResponse : PlayFabResultCommon + { + /// + /// The order's updated purchase status. + /// + public string PurchaseStatus; + } + + public enum Region + { + USCentral, + USEast, + EUWest, + Singapore, + Japan, + Brazil, + Australia + } + + /// + /// This API will trigger a player_tag_removed event and remove a tag with the given TagName and PlayFabID from the + /// corresponding player profile. TagName can be used for segmentation and it is limited to 256 characters + /// + [Serializable] + public class RemovePlayerTagRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Unique tag for player profile. + /// + public string TagName; + } + + [Serializable] + public class RemovePlayerTagResult : PlayFabResultCommon + { + } + + [Serializable] + public class RemoveServerBuildRequest : PlayFabRequestCommon + { + /// + /// unique identifier of the previously uploaded build executable to be removed + /// + public string BuildId; + } + + [Serializable] + public class RemoveServerBuildResult : PlayFabResultCommon + { + } + + /// + /// Virtual currencies to be removed cannot have entries in any catalog nor store for the title. Note that this operation + /// will not remove player balances for the removed currencies; if a deleted currency is recreated at any point, user + /// balances will be in an undefined state. + /// + [Serializable] + public class RemoveVirtualCurrencyTypesRequest : PlayFabRequestCommon + { + /// + /// List of virtual currencies to delete + /// + public List VirtualCurrencies; + } + + /// + /// Note that this action cannot be un-done. All statistics for this character will be deleted, removing the user from all + /// leaderboards for the game. + /// + [Serializable] + public class ResetCharacterStatisticsRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class ResetCharacterStatisticsResult : PlayFabResultCommon + { + } + + /// + /// Resets a player's password taking in a new password based and validating the user based off of a token sent to the + /// playerto their email. The token expires after 30 minutes. + /// + [Serializable] + public class ResetPasswordRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The new password for the player. + /// + public string Password; + /// + /// The token of the player requesting the password reset. + /// + public string Token; + } + + [Serializable] + public class ResetPasswordResult : PlayFabResultCommon + { + } + + /// + /// Note that this action cannot be un-done. All statistics for this user will be deleted, removing the user from all + /// leaderboards for the game. + /// + [Serializable] + public class ResetUserStatisticsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class ResetUserStatisticsResult : PlayFabResultCommon + { + } + + public enum ResolutionOutcome + { + Revoke, + Reinstate, + Manual + } + + [Serializable] + public class ResolvePurchaseDisputeRequest : PlayFabRequestCommon + { + /// + /// Unique order ID for the purchase in question. + /// + public string OrderId; + /// + /// Enum for the desired purchase result state after notifying the payment provider. Valid values are Revoke, Reinstate and + /// Manual. Manual will cause no change to the order state. + /// + public ResolutionOutcome Outcome; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// The Reason parameter should correspond with the payment providers reason field, if they require one such as Facebook. In + /// the case of Facebook this must match one of their refund or dispute resolution enums (See: + /// https://developers.facebook.com/docs/payments/implementation-guide/handling-disputes-refunds) + /// + public string Reason; + } + + [Serializable] + public class ResolvePurchaseDisputeResponse : PlayFabResultCommon + { + /// + /// The order's updated purchase status. + /// + public string PurchaseStatus; + } + + [Serializable] + public class ResultTableNode : PlayFabBaseModel + { + /// + /// Either an ItemId, or the TableId of another random result table + /// + public string ResultItem; + /// + /// Whether this entry in the table is an item or a link to another table + /// + public ResultTableNodeType ResultItemType; + /// + /// How likely this is to be rolled - larger numbers add more weight + /// + public int Weight; + } + + public enum ResultTableNodeType + { + ItemId, + TableId + } + + /// + /// Setting the active state of all non-expired bans for a user to Inactive. Expired bans with an Active state will be + /// ignored, however. Returns information about applied updates only. + /// + [Serializable] + public class RevokeAllBansForUserRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class RevokeAllBansForUserResult : PlayFabResultCommon + { + /// + /// Information on the bans that were revoked. + /// + public List BanData; + } + + /// + /// Setting the active state of all bans requested to Inactive regardless of whether that ban has already expired. BanIds + /// that do not exist will be skipped. Returns information about applied updates only. + /// + [Serializable] + public class RevokeBansRequest : PlayFabRequestCommon + { + /// + /// Ids of the bans to be revoked. Maximum 100. + /// + public List BanIds; + } + + [Serializable] + public class RevokeBansResult : PlayFabResultCommon + { + /// + /// Information on the bans that were revoked + /// + public List BanData; + } + + [Serializable] + public class RevokeInventoryItem : PlayFabBaseModel + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// Unique PlayFab assigned instance identifier of the item + /// + public string ItemInstanceId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + /// + /// In cases where the inventory item in question is a "crate", and the items it contained have already been dispensed, this + /// will not revoke access or otherwise remove the items which were dispensed. + /// + [Serializable] + public class RevokeInventoryItemRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// Unique PlayFab assigned instance identifier of the item + /// + public string ItemInstanceId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + /// + /// In cases where the inventory item in question is a "crate", and the items it contained have already been dispensed, this + /// will not revoke access or otherwise remove the items which were dispensed. + /// + [Serializable] + public class RevokeInventoryItemsRequest : PlayFabRequestCommon + { + /// + /// Array of player items to revoke, between 1 and 25 items. + /// + public List Items; + } + + [Serializable] + public class RevokeInventoryItemsResult : PlayFabResultCommon + { + /// + /// Collection of any errors that occurred during processing. + /// + public List Errors; + } + + [Serializable] + public class RevokeInventoryResult : PlayFabResultCommon + { + } + + [Serializable] + public class RevokeItemError : PlayFabBaseModel + { + /// + /// Specific error that was encountered. + /// + public GenericErrorCodes? Error; + /// + /// Item information that failed to be revoked. + /// + public RevokeInventoryItem Item; + } + + /// + /// The returned task instance ID can be used to query for task execution status. + /// + [Serializable] + public class RunTaskRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Provide either the task ID or the task name to run a task. + /// + public NameIdentifier Identifier; + } + + [Serializable] + public class RunTaskResult : PlayFabResultCommon + { + /// + /// ID of the task instance that is started. This can be used in Get*TaskInstance (e.g. GetCloudScriptTaskInstance) API call + /// to retrieve status for the task instance. + /// + public string TaskInstanceId; + } + + [Serializable] + public class ScheduledTask : PlayFabBaseModel + { + /// + /// Description the task + /// + public string Description; + /// + /// Whether the schedule is active. Inactive schedule will not trigger task execution. + /// + public bool IsActive; + /// + /// UTC time of last run + /// + public DateTime? LastRunTime; + /// + /// Name of the task. This is a unique identifier for tasks in the title. + /// + public string Name; + /// + /// UTC time of next run + /// + public DateTime? NextRunTime; + /// + /// Task parameter. Different types of task have different parameter structure. See each task type's create API + /// documentation for the details. + /// + public object Parameter; + /// + /// Cron expression for the run schedule of the task. The expression should be in UTC. + /// + public string Schedule; + /// + /// ID of the task + /// + public string TaskId; + /// + /// Task type. + /// + public ScheduledTaskType? Type; + } + + public enum ScheduledTaskType + { + CloudScript, + ActionsOnPlayerSegment, + CloudScriptAzureFunctions, + InsightsScheduledScaling + } + + [Serializable] + public class ScriptExecutionError : PlayFabBaseModel + { + /// + /// Error code, such as CloudScriptNotFound, JavascriptException, CloudScriptFunctionArgumentSizeExceeded, + /// CloudScriptAPIRequestCountExceeded, CloudScriptAPIRequestError, or CloudScriptHTTPRequestError + /// + public string Error; + /// + /// Details about the error + /// + public string Message; + /// + /// Point during the execution of the script at which the error occurred, if any + /// + public string StackTrace; + } + + [Serializable] + public class SegmentAndDefinition : PlayFabBaseModel + { + /// + /// Filter property for ad campaign filter. + /// + public AdCampaignSegmentFilter AdCampaignFilter; + /// + /// property for all player filter. + /// + public AllPlayersSegmentFilter AllPlayersFilter; + /// + /// Filter property for first login date. + /// + public FirstLoginDateSegmentFilter FirstLoginDateFilter; + /// + /// Filter property for first login timespan. + /// + public FirstLoginTimespanSegmentFilter FirstLoginFilter; + /// + /// Filter property for last login date. + /// + public LastLoginDateSegmentFilter LastLoginDateFilter; + /// + /// Filter property for last login timespan. + /// + public LastLoginTimespanSegmentFilter LastLoginFilter; + /// + /// Filter property for linked in user account. + /// + public LinkedUserAccountSegmentFilter LinkedUserAccountFilter; + /// + /// Filter property for linked in user account has email. + /// + public LinkedUserAccountHasEmailSegmentFilter LinkedUserAccountHasEmailFilter; + /// + /// Filter property for location. + /// + public LocationSegmentFilter LocationFilter; + /// + /// Filter property for push notification. + /// + public PushNotificationSegmentFilter PushNotificationFilter; + /// + /// Filter property for statistics. + /// + public StatisticSegmentFilter StatisticFilter; + /// + /// Filter property for tags. + /// + public TagSegmentFilter TagFilter; + /// + /// Filter property for total value to date in USD. + /// + public TotalValueToDateInUSDSegmentFilter TotalValueToDateInUSDFilter; + /// + /// Filter property for user origination. + /// + public UserOriginationSegmentFilter UserOriginationFilter; + /// + /// Filter property for value to date. + /// + public ValueToDateSegmentFilter ValueToDateFilter; + /// + /// Filter property for virtual currency. + /// + public VirtualCurrencyBalanceSegmentFilter VirtualCurrencyBalanceFilter; + } + + public enum SegmentCountryCode + { + AF, + AX, + AL, + DZ, + AS, + AD, + AO, + AI, + AQ, + AG, + AR, + AM, + AW, + AU, + AT, + AZ, + BS, + BH, + BD, + BB, + BY, + BE, + BZ, + BJ, + BM, + BT, + BO, + BQ, + BA, + BW, + BV, + BR, + IO, + BN, + BG, + BF, + BI, + KH, + CM, + CA, + CV, + KY, + CF, + TD, + CL, + CN, + CX, + CC, + CO, + KM, + CG, + CD, + CK, + CR, + CI, + HR, + CU, + CW, + CY, + CZ, + DK, + DJ, + DM, + DO, + EC, + EG, + SV, + GQ, + ER, + EE, + ET, + FK, + FO, + FJ, + FI, + FR, + GF, + PF, + TF, + GA, + GM, + GE, + DE, + GH, + GI, + GR, + GL, + GD, + GP, + GU, + GT, + GG, + GN, + GW, + GY, + HT, + HM, + VA, + HN, + HK, + HU, + IS, + IN, + ID, + IR, + IQ, + IE, + IM, + IL, + IT, + JM, + JP, + JE, + JO, + KZ, + KE, + KI, + KP, + KR, + KW, + KG, + LA, + LV, + LB, + LS, + LR, + LY, + LI, + LT, + LU, + MO, + MK, + MG, + MW, + MY, + MV, + ML, + MT, + MH, + MQ, + MR, + MU, + YT, + MX, + FM, + MD, + MC, + MN, + ME, + MS, + MA, + MZ, + MM, + NA, + NR, + NP, + NL, + NC, + NZ, + NI, + NE, + NG, + NU, + NF, + MP, + NO, + OM, + PK, + PW, + PS, + PA, + PG, + PY, + PE, + PH, + PN, + PL, + PT, + PR, + QA, + RE, + RO, + RU, + RW, + BL, + SH, + KN, + LC, + MF, + PM, + VC, + WS, + SM, + ST, + SA, + SN, + RS, + SC, + SL, + SG, + SX, + SK, + SI, + SB, + SO, + ZA, + GS, + SS, + ES, + LK, + SD, + SR, + SJ, + SZ, + SE, + CH, + SY, + TW, + TJ, + TZ, + TH, + TL, + TG, + TK, + TO, + TT, + TN, + TR, + TM, + TC, + TV, + UG, + UA, + AE, + GB, + US, + UM, + UY, + UZ, + VU, + VE, + VN, + VG, + VI, + WF, + EH, + YE, + ZM, + ZW + } + + public enum SegmentCurrency + { + AED, + AFN, + ALL, + AMD, + ANG, + AOA, + ARS, + AUD, + AWG, + AZN, + BAM, + BBD, + BDT, + BGN, + BHD, + BIF, + BMD, + BND, + BOB, + BRL, + BSD, + BTN, + BWP, + BYR, + BZD, + CAD, + CDF, + CHF, + CLP, + CNY, + COP, + CRC, + CUC, + CUP, + CVE, + CZK, + DJF, + DKK, + DOP, + DZD, + EGP, + ERN, + ETB, + EUR, + FJD, + FKP, + GBP, + GEL, + GGP, + GHS, + GIP, + GMD, + GNF, + GTQ, + GYD, + HKD, + HNL, + HRK, + HTG, + HUF, + IDR, + ILS, + IMP, + INR, + IQD, + IRR, + ISK, + JEP, + JMD, + JOD, + JPY, + KES, + KGS, + KHR, + KMF, + KPW, + KRW, + KWD, + KYD, + KZT, + LAK, + LBP, + LKR, + LRD, + LSL, + LYD, + MAD, + MDL, + MGA, + MKD, + MMK, + MNT, + MOP, + MRO, + MUR, + MVR, + MWK, + MXN, + MYR, + MZN, + NAD, + NGN, + NIO, + NOK, + NPR, + NZD, + OMR, + PAB, + PEN, + PGK, + PHP, + PKR, + PLN, + PYG, + QAR, + RON, + RSD, + RUB, + RWF, + SAR, + SBD, + SCR, + SDG, + SEK, + SGD, + SHP, + SLL, + SOS, + SPL, + SRD, + STD, + SVC, + SYP, + SZL, + THB, + TJS, + TMT, + TND, + TOP, + TRY, + TTD, + TVD, + TWD, + TZS, + UAH, + UGX, + USD, + UYU, + UZS, + VEF, + VND, + VUV, + WST, + XAF, + XCD, + XDR, + XOF, + XPF, + YER, + ZAR, + ZMW, + ZWD + } + + public enum SegmentFilterComparison + { + GreaterThan, + LessThan, + EqualTo, + NotEqualTo, + GreaterThanOrEqual, + LessThanOrEqual, + Exists, + Contains, + NotContains + } + + public enum SegmentLoginIdentityProvider + { + Unknown, + PlayFab, + Custom, + GameCenter, + GooglePlay, + Steam, + XBoxLive, + PSN, + Kongregate, + Facebook, + IOSDevice, + AndroidDevice, + Twitch, + WindowsHello, + GameServer, + CustomServer, + NintendoSwitch, + FacebookInstantGames, + OpenIdConnect, + Apple, + NintendoSwitchAccount + } + + [Serializable] + public class SegmentModel : PlayFabBaseModel + { + /// + /// Segment description. + /// + public string Description; + /// + /// Segment actions for current entered segment players. + /// + public List EnteredSegmentActions; + /// + /// Segment last updated date time. + /// + public DateTime LastUpdateTime; + /// + /// Segment actions for current left segment players. + /// + public List LeftSegmentActions; + /// + /// Segment name. + /// + public string Name; + /// + /// Segment id in hex. + /// + public string SegmentId; + /// + /// Segment or definitions. This includes segment and definitions and filters. + /// + public List SegmentOrDefinitions; + } + + [Serializable] + public class SegmentOrDefinition : PlayFabBaseModel + { + /// + /// List of segment and definitions. + /// + public List SegmentAndDefinitions; + } + + public enum SegmentPushNotificationDevicePlatform + { + ApplePushNotificationService, + GoogleCloudMessaging + } + + [Serializable] + public class SegmentTrigger : PlayFabBaseModel + { + /// + /// Ban player segment trigger action. + /// + public BanPlayerSegmentAction BanPlayerAction; + /// + /// Delete player segment trigger action. + /// + public DeletePlayerSegmentAction DeletePlayerAction; + /// + /// Delete player statistic segment trigger action. + /// + public DeletePlayerStatisticSegmentAction DeletePlayerStatisticAction; + /// + /// Email notification segment trigger action. + /// + public EmailNotificationSegmentAction EmailNotificationAction; + /// + /// Execute azure function segment trigger action. + /// + public ExecuteAzureFunctionSegmentAction ExecuteAzureFunctionAction; + /// + /// Execute cloud script segment trigger action. + /// + public ExecuteCloudScriptSegmentAction ExecuteCloudScriptAction; + /// + /// Grant item segment trigger action. + /// + public GrantItemSegmentAction GrantItemAction; + /// + /// Grant virtual currency segment trigger action. + /// + public GrantVirtualCurrencySegmentAction GrantVirtualCurrencyAction; + /// + /// Increment player statistic segment trigger action. + /// + public IncrementPlayerStatisticSegmentAction IncrementPlayerStatisticAction; + /// + /// Push notification segment trigger action. + /// + public PushNotificationSegmentAction PushNotificationAction; + } + + /// + /// If the account in question is a "temporary" account (for example, one that was created via a call to + /// LoginFromIOSDeviceID), thisfunction will have no effect. Only PlayFab accounts which have valid email addresses will be + /// able to receive a password reset email using this API. + /// + [Serializable] + public class SendAccountRecoveryEmailRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// User email address attached to their account + /// + public string Email; + /// + /// The email template id of the account recovery email template to send. + /// + public string EmailTemplateId; + } + + [Serializable] + public class SendAccountRecoveryEmailResult : PlayFabResultCommon + { + } + + /// + /// APIs that require signatures require that the player have a configured Player Secret Key that is used to sign all + /// requests. Players that don't have a secret will be blocked from making API calls until it is configured. To create a + /// signature header add a SHA256 hashed string containing UTF8 encoded JSON body as it will be sent to the server, the + /// current time in UTC formatted to ISO 8601, and the players secret formatted as 'body.date.secret'. Place the resulting + /// hash into the header X-PlayFab-Signature, along with a header X-PlayFab-Timestamp of the same UTC timestamp used in the + /// signature. + /// + [Serializable] + public class SetPlayerSecretRequest : PlayFabRequestCommon + { + /// + /// Player secret that is used to verify API request signatures (Enterprise Only). + /// + public string PlayerSecret; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class SetPlayerSecretResult : PlayFabResultCommon + { + } + + [Serializable] + public class SetPublishedRevisionRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Revision to make the current published revision + /// + public int Revision; + /// + /// Version number + /// + public int Version; + } + + [Serializable] + public class SetPublishedRevisionResult : PlayFabResultCommon + { + } + + /// + /// This API is designed to store publisher-specific values which can be read, but not written to, by the client. This data + /// is shared across all titles assigned to a particular publisher, and can be used for cross-game coordination. Only titles + /// assigned to a publisher can use this API. This operation is additive. If a Key does not exist in the current dataset, it + /// will be added with the specified Value. If it already exists, the Value for that key will be overwritten with the new + /// Value. For more information email helloplayfab@microsoft.com + /// + [Serializable] + public class SetPublisherDataRequest : PlayFabRequestCommon + { + /// + /// key we want to set a value on (note, this is additive - will only replace an existing key's value if they are the same + /// name.) Keys are trimmed of whitespace. Keys may not begin with the '!' character. + /// + public string Key; + /// + /// new value to set. Set to null to remove a value + /// + public string Value; + } + + [Serializable] + public class SetPublisherDataResult : PlayFabResultCommon + { + } + + /// + /// Will set the given key values in the specified override or the primary title data based on whether the label is provided + /// or not. + /// + [Serializable] + public class SetTitleDataAndOverridesRequest : PlayFabRequestCommon + { + /// + /// List of titleData key-value pairs to set/delete. Use an empty value to delete an existing key; use a non-empty value to + /// create/update a key. + /// + public List KeyValues; + /// + /// Name of the override. + /// + public string OverrideLabel; + } + + [Serializable] + public class SetTitleDataAndOverridesResult : PlayFabResultCommon + { + } + + /// + /// This API method is designed to store title specific values which can be read by the client. For example, a developer + /// could choose to store values which modify the user experience, such as enemy spawn rates, weapon strengths, movement + /// speeds, etc. This allows a developer to update the title without the need to create, test, and ship a new build. This + /// operation is additive. If a Key does not exist in the current dataset, it will be added with the specified Value. If it + /// already exists, the Value for that key will be overwritten with the new Value. + /// + [Serializable] + public class SetTitleDataRequest : PlayFabRequestCommon + { + /// + /// key we want to set a value on (note, this is additive - will only replace an existing key's value if they are the same + /// name.) Keys are trimmed of whitespace. Keys may not begin with the '!' character. + /// + public string Key; + /// + /// new value to set. Set to null to remove a value + /// + public string Value; + } + + [Serializable] + public class SetTitleDataResult : PlayFabResultCommon + { + } + + /// + /// When using the Apple Push Notification service (APNS) or the development version (APNS_SANDBOX), the APNS Private Key + /// should be used as the Credential in this call. With Google Cloud Messaging (GCM), the Android API Key should be used. + /// The current ARN (if one exists) can be overwritten by setting the OverwriteOldARN boolean to true. + /// + [Serializable] + public class SetupPushNotificationRequest : PlayFabRequestCommon + { + /// + /// Credential is the Private Key for APNS/APNS_SANDBOX, and the API Key for GCM + /// + public string Credential; + /// + /// for APNS, this is the PlatformPrincipal (SSL Certificate) + /// + public string Key; + /// + /// This field is deprecated and any usage of this will cause the API to fail. + /// + public string Name; + /// + /// replace any existing ARN with the newly generated one. If this is set to false, an error will be returned if + /// notifications have already setup for this platform. + /// + public bool OverwriteOldARN; + /// + /// supported notification platforms are Apple Push Notification Service (APNS and APNS_SANDBOX) for iOS and Google Cloud + /// Messaging (GCM) for Android + /// + public PushSetupPlatform Platform; + } + + [Serializable] + public class SetupPushNotificationResult : PlayFabResultCommon + { + /// + /// Amazon Resource Name for the created notification topic. + /// + public string ARN; + } + + [Serializable] + public class SharedSecret : PlayFabBaseModel + { + /// + /// Flag to indicate if this key is disabled + /// + public bool Disabled; + /// + /// Friendly name for this key + /// + public string FriendlyName; + /// + /// The player shared secret to use when calling Client/GetTitlePublicKey + /// + public string SecretKey; + } + + public enum SourceType + { + Admin, + BackEnd, + GameClient, + GameServer, + Partner, + Custom, + API + } + + public enum StatisticAggregationMethod + { + Last, + Min, + Max, + Sum + } + + [Serializable] + public class StatisticModel : PlayFabBaseModel + { + /// + /// Statistic name + /// + public string Name; + /// + /// Statistic value + /// + public int Value; + /// + /// Statistic version (0 if not a versioned statistic) + /// + public int Version; + } + + public enum StatisticResetIntervalOption + { + Never, + Hour, + Day, + Week, + Month + } + + [Serializable] + public class StatisticSegmentFilter : PlayFabBaseModel + { + /// + /// Statistic filter comparison. + /// + public SegmentFilterComparison? Comparison; + /// + /// Statistic filter value. + /// + public string FilterValue; + /// + /// Statistic name. + /// + public string Name; + /// + /// Use current version of statistic? + /// + public bool? UseCurrentVersion; + /// + /// Statistic version. + /// + public int? Version; + } + + public enum StatisticVersionArchivalStatus + { + NotScheduled, + Scheduled, + Queued, + InProgress, + Complete + } + + public enum StatisticVersionStatus + { + Active, + SnapshotPending, + Snapshot, + ArchivalPending, + Archived + } + + /// + /// A store entry that list a catalog item at a particular price + /// + [Serializable] + public class StoreItem : PlayFabBaseModel + { + /// + /// Store specific custom data. The data only exists as part of this store; it is not transferred to item instances + /// + public object CustomData; + /// + /// Intended display position for this item. Note that 0 is the first position + /// + public uint? DisplayPosition; + /// + /// Unique identifier of the item as it exists in the catalog - note that this must exactly match the ItemId from the + /// catalog + /// + public string ItemId; + /// + /// Override prices for this item for specific currencies + /// + public Dictionary RealCurrencyPrices; + /// + /// Override prices for this item in virtual currencies and "RM" (the base Real Money purchase price, in USD pennies) + /// + public Dictionary VirtualCurrencyPrices; + } + + /// + /// Marketing data about a specific store + /// + [Serializable] + public class StoreMarketingModel : PlayFabBaseModel + { + /// + /// Tagline for a store. + /// + public string Description; + /// + /// Display name of a store as it will appear to users. + /// + public string DisplayName; + /// + /// Custom data about a store. + /// + public object Metadata; + } + + [Serializable] + public class SubscriptionModel : PlayFabBaseModel + { + /// + /// When this subscription expires. + /// + public DateTime Expiration; + /// + /// The time the subscription was orignially purchased + /// + public DateTime InitialSubscriptionTime; + /// + /// Whether this subscription is currently active. That is, if Expiration > now. + /// + public bool IsActive; + /// + /// The status of this subscription, according to the subscription provider. + /// + public SubscriptionProviderStatus? Status; + /// + /// The id for this subscription + /// + public string SubscriptionId; + /// + /// The item id for this subscription from the primary catalog + /// + public string SubscriptionItemId; + /// + /// The provider for this subscription. Apple or Google Play are supported today. + /// + public string SubscriptionProvider; + } + + public enum SubscriptionProviderStatus + { + NoError, + Cancelled, + UnknownError, + BillingError, + ProductUnavailable, + CustomerDidNotAcceptPriceChange, + FreeTrial, + PaymentPending + } + + [Serializable] + public class SubtractUserVirtualCurrencyRequest : PlayFabRequestCommon + { + /// + /// Amount to be subtracted from the user balance of the specified virtual currency. + /// + public int Amount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// PlayFab unique identifier of the user whose virtual currency balance is to be decreased. + /// + public string PlayFabId; + /// + /// Name of the virtual currency which is to be decremented. + /// + public string VirtualCurrency; + } + + [Serializable] + public class TagModel : PlayFabBaseModel + { + /// + /// Full value of the tag, including namespace + /// + public string TagValue; + } + + [Serializable] + public class TagSegmentFilter : PlayFabBaseModel + { + /// + /// Tag comparison. + /// + public SegmentFilterComparison? Comparison; + /// + /// Tag value. + /// + public string TagValue; + } + + [Serializable] + public class TaskInstanceBasicSummary : PlayFabBaseModel + { + /// + /// UTC timestamp when the task completed. + /// + public DateTime? CompletedAt; + /// + /// Error message for last processing attempt, if an error occured. + /// + public string ErrorMessage; + /// + /// Estimated time remaining in seconds. + /// + public double? EstimatedSecondsRemaining; + /// + /// Progress represented as percentage. + /// + public double? PercentComplete; + /// + /// If manually scheduled, ID of user who scheduled the task. + /// + public string ScheduledByUserId; + /// + /// UTC timestamp when the task started. + /// + public DateTime StartedAt; + /// + /// Current status of the task instance. + /// + public TaskInstanceStatus? Status; + /// + /// Identifier of the task this instance belongs to. + /// + public NameIdentifier TaskIdentifier; + /// + /// ID of the task instance. + /// + public string TaskInstanceId; + /// + /// Type of the task. + /// + public ScheduledTaskType? Type; + } + + public enum TaskInstanceStatus + { + Succeeded, + Starting, + InProgress, + Failed, + Aborted, + Stalled + } + + public enum TitleActivationStatus + { + None, + ActivatedTitleKey, + PendingSteam, + ActivatedSteam, + RevokedSteam + } + + [Serializable] + public class TitleDataKeyValue : PlayFabBaseModel + { + /// + /// Key we want to set a value on (note, this is additive - will only replace an existing key's value if they are the same + /// name.) Keys are trimmed of whitespace. Keys may not begin with the '!' character. + /// + public string Key; + /// + /// New value to set. Set to null to remove a value + /// + public string Value; + } + + [Serializable] + public class TotalValueToDateInUSDSegmentFilter : PlayFabBaseModel + { + /// + /// Total value to date USD amount. + /// + public string Amount; + /// + /// Total value to date USD comparison. + /// + public SegmentFilterComparison? Comparison; + } + + /// + /// Represents a single update ban request. + /// + [Serializable] + public class UpdateBanRequest : PlayFabBaseModel + { + /// + /// The updated active state for the ban. Null for no change. + /// + public bool? Active; + /// + /// The id of the ban to be updated. + /// + public string BanId; + /// + /// The updated expiration date for the ban. Null for no change. + /// + public DateTime? Expires; + /// + /// The updated IP address for the ban. Null for no change. + /// + public string IPAddress; + /// + /// The updated MAC address for the ban. Null for no change. + /// + public string MACAddress; + /// + /// Whether to make this ban permanent. Set to true to make this ban permanent. This will not modify Active state. + /// + public bool? Permanent; + /// + /// The updated reason for the ban to be updated. Maximum 140 characters. Null for no change. + /// + public string Reason; + } + + /// + /// For each ban, only updates the values that are set. Leave any value to null for no change. If a ban could not be found, + /// the rest are still applied. Returns information about applied updates only. + /// + [Serializable] + public class UpdateBansRequest : PlayFabRequestCommon + { + /// + /// List of bans to be updated. Maximum 100. + /// + public List Bans; + } + + [Serializable] + public class UpdateBansResult : PlayFabResultCommon + { + /// + /// Information on the bans that were updated + /// + public List BanData; + } + + /// + /// This operation is not additive. Using it will cause the indicated catalog version to be created from scratch. If there + /// is an existing catalog with the version number in question, it will be deleted and replaced with only the items + /// specified in this call. + /// + [Serializable] + public class UpdateCatalogItemsRequest : PlayFabRequestCommon + { + /// + /// Array of catalog items to be submitted. Note that while CatalogItem has a parameter for CatalogVersion, it is not + /// required and ignored in this call. + /// + public List Catalog; + /// + /// Which catalog is being updated. If null, uses the default catalog. + /// + public string CatalogVersion; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Should this catalog be set as the default catalog. Defaults to true. If there is currently no default catalog, this will + /// always set it. + /// + public bool? SetAsDefaultCatalog; + } + + [Serializable] + public class UpdateCatalogItemsResult : PlayFabResultCommon + { + } + + [Serializable] + public class UpdateCloudScriptRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// PlayFab user ID of the developer initiating the request. + /// + public string DeveloperPlayFabId; + /// + /// List of Cloud Script files to upload to create the new revision. Must have at least one file. + /// + public List Files; + /// + /// Immediately publish the new revision + /// + public bool Publish; + } + + [Serializable] + public class UpdateCloudScriptResult : PlayFabResultCommon + { + /// + /// New revision number created + /// + public int Revision; + /// + /// Cloud Script version updated + /// + public int Version; + } + + [Serializable] + public class UpdateOpenIdConnectionRequest : PlayFabRequestCommon + { + /// + /// The client ID given by the ID provider. + /// + public string ClientId; + /// + /// The client secret given by the ID provider. + /// + public string ClientSecret; + /// + /// A name for the connection that identifies it within the title. + /// + public string ConnectionId; + /// + /// The issuer URL or discovery document URL to read issuer information from + /// + public string IssuerDiscoveryUrl; + /// + /// Manually specified information for an OpenID Connect issuer. + /// + public OpenIdIssuerInformation IssuerInformation; + } + + /// + /// Player Shared Secret Keys are used for the call to Client/GetTitlePublicKey, which exchanges the shared secret for an + /// RSA CSP blob to be used to encrypt the payload of account creation requests when that API requires a signature header. + /// + [Serializable] + public class UpdatePlayerSharedSecretRequest : PlayFabRequestCommon + { + /// + /// Disable or Enable this key + /// + public bool Disabled; + /// + /// Friendly name for this key + /// + public string FriendlyName; + /// + /// The shared secret key to update + /// + public string SecretKey; + } + + [Serializable] + public class UpdatePlayerSharedSecretResult : PlayFabResultCommon + { + } + + /// + /// Statistics are numeric values, with each statistic in the title also generating a leaderboard. The ResetInterval enables + /// automatically resetting leaderboards on a specified interval. Upon reset, the statistic updates to a new version with no + /// values (effectively removing all players from the leaderboard). The previous version's statistic values are also + /// archived for retrieval, if needed (see GetPlayerStatisticVersions). Statistics not created via a call to + /// CreatePlayerStatisticDefinition by default have a VersionChangeInterval of Never, meaning they do not reset on a + /// schedule, but they can be set to do so via a call to UpdatePlayerStatisticDefinition. Once a statistic has been reset + /// (sometimes referred to as versioned or incremented), the now-previous version can still be written to for up a short, + /// pre-defined period (currently 10 seconds), to prevent issues with levels completing around the time of the reset. Also, + /// once reset, the historical statistics for players in the title may be retrieved using the URL specified in the version + /// information (GetPlayerStatisticVersions). The AggregationMethod determines what action is taken when a new statistic + /// value is submitted - always update with the new value (Last), use the highest of the old and new values (Max), use the + /// smallest (Min), or add them together (Sum). + /// + [Serializable] + public class UpdatePlayerStatisticDefinitionRequest : PlayFabRequestCommon + { + /// + /// the aggregation method to use in updating the statistic (defaults to last) + /// + public StatisticAggregationMethod? AggregationMethod; + /// + /// unique name of the statistic + /// + public string StatisticName; + /// + /// interval at which the values of the statistic for all players are reset (changes are effective at the next occurance of + /// the new interval boundary) + /// + public StatisticResetIntervalOption? VersionChangeInterval; + } + + [Serializable] + public class UpdatePlayerStatisticDefinitionResult : PlayFabResultCommon + { + /// + /// updated statistic definition + /// + public PlayerStatisticDefinition Statistic; + } + + /// + /// Updates permissions for your title. Policies affect what is allowed to happen on your title. Your policy is a collection + /// of statements that, together, govern particular area for your title. Today, the only allowed policy is called + /// 'ApiPolicy' and it governs what API calls are allowed. To verify that you have the latest version always download the + /// current policy from GetPolicy before uploading a new policy. PlayFab updates the base policy periodically and will + /// automatically apply it to the uploaded policy. Overwriting the combined policy blindly may result in unexpected API + /// errors. + /// + [Serializable] + public class UpdatePolicyRequest : PlayFabRequestCommon + { + /// + /// Whether to overwrite or append to the existing policy. + /// + public bool OverwritePolicy; + /// + /// The name of the policy being updated. Only supported name is 'ApiPolicy' + /// + public string PolicyName; + /// + /// Version of the policy to update. Must be the latest (as returned by GetPolicy). + /// + public int PolicyVersion; + /// + /// The new statements to include in the policy. + /// + public List Statements; + } + + [Serializable] + public class UpdatePolicyResponse : PlayFabResultCommon + { + /// + /// The name of the policy that was updated. + /// + public string PolicyName; + /// + /// The statements included in the new version of the policy. + /// + public List Statements; + } + + /// + /// This operation is additive. Tables with TableId values not currently defined will be added, while those with TableId + /// values matching Tables currently in the catalog will be overwritten with the given values. + /// + [Serializable] + public class UpdateRandomResultTablesRequest : PlayFabRequestCommon + { + /// + /// which catalog is being updated. If null, update the current default catalog version + /// + public string CatalogVersion; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// array of random result tables to make available (Note: specifying an existing TableId will result in overwriting that + /// table, while any others will be added to the available set) + /// + public List Tables; + } + + [Serializable] + public class UpdateRandomResultTablesResult : PlayFabResultCommon + { + } + + /// + /// Update segment properties data which are planning to update + /// + [Serializable] + public class UpdateSegmentRequest : PlayFabRequestCommon + { + /// + /// Segment model with all of the segment properties data. + /// + public SegmentModel SegmentModel; + } + + [Serializable] + public class UpdateSegmentResponse : PlayFabResultCommon + { + /// + /// Error message. + /// + public string ErrorMessage; + /// + /// Segment id. + /// + public string SegmentId; + } + + /// + /// This operation is not additive. Using it will cause the indicated virtual store to be created from scratch. If there is + /// an existing store with the same storeId, it will be deleted and replaced with only the items specified in this call. A + /// store contains an array of references to items defined inthe catalog, along with the prices for the item, in both real + /// world and virtual currencies. These prices act as an override to any prices defined in the catalog. In this way, the + /// base definitions of the items may be defined in the catalog, with all associated properties, while the pricing can be + /// set for each store, as needed. This allows for subsets of goods to be defined for different purposes (in order to + /// simplify showing some, but not all catalog items to users, based upon different characteristics), along with unique + /// prices. Note that all prices defined in the catalog and store definitions for the item are considered valid, and that a + /// compromised client can be made to send a request for an item based upon any of these definitions. If no price is + /// specified in the store for an item, the price set in the catalog should be displayed to the user. + /// + [Serializable] + public class UpdateStoreItemsRequest : PlayFabRequestCommon + { + /// + /// Catalog version of the store to update. If null, uses the default catalog. + /// + public string CatalogVersion; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Additional data about the store + /// + public StoreMarketingModel MarketingData; + /// + /// Array of store items - references to catalog items, with specific pricing - to be added + /// + public List Store; + /// + /// Unique identifier for the store which is to be updated + /// + public string StoreId; + } + + [Serializable] + public class UpdateStoreItemsResult : PlayFabResultCommon + { + } + + /// + /// Note that when calling this API, all properties of the task have to be provided, including properties that you do not + /// want to change. Parameters not specified would be set to default value. If the task name in the update request is new, a + /// task rename operation will be executed before updating other fields of the task. WARNING: Renaming of a task may break + /// logics where the task name is used as an identifier. + /// + [Serializable] + public class UpdateTaskRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Description the task + /// + public string Description; + /// + /// Specify either the task ID or the name of the task to be updated. + /// + public NameIdentifier Identifier; + /// + /// Whether the schedule is active. Inactive schedule will not trigger task execution. + /// + public bool IsActive; + /// + /// Name of the task. This is a unique identifier for tasks in the title. + /// + public string Name; + /// + /// Parameter object specific to the task type. See each task type's create API documentation for details. + /// + public object Parameter; + /// + /// Cron expression for the run schedule of the task. The expression should be in UTC. + /// + public string Schedule; + /// + /// Task type. + /// + public ScheduledTaskType Type; + } + + /// + /// This function performs an additive update of the arbitrary JSON object containing the custom data for the user. In + /// updating the custom data object, keys which already exist in the object will have their values overwritten, while keys + /// with null values will be removed. No other key-value pairs will be changed apart from those specified in the call. + /// + [Serializable] + public class UpdateUserDataRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Key-value pairs to be written to the custom data. Note that keys are trimmed of whitespace, are limited in size, and may + /// not begin with a '!' character or be null. + /// + public Dictionary Data; + /// + /// Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language + /// constraints. Use this to delete the keys directly. + /// + public List KeysToRemove; + /// + /// Permission to be applied to all user data keys written in this request. Defaults to "private" if not set. + /// + public UserDataPermission? Permission; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class UpdateUserDataResult : PlayFabResultCommon + { + /// + /// Indicates the current version of the data that has been set. This is incremented with every set call for that type of + /// data (read-only, internal, etc). This version can be provided in Get calls to find updated data. + /// + public uint DataVersion; + } + + /// + /// This function performs an additive update of the arbitrary JSON object containing the custom data for the user. In + /// updating the custom data object, keys which already exist in the object will have their values overwritten, keys with + /// null values will be removed. No other key-value pairs will be changed apart from those specified in the call. + /// + [Serializable] + public class UpdateUserInternalDataRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Key-value pairs to be written to the custom data. Note that keys are trimmed of whitespace, are limited in size, and may + /// not begin with a '!' character or be null. + /// + public Dictionary Data; + /// + /// Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language + /// constraints. Use this to delete the keys directly. + /// + public List KeysToRemove; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + /// + /// In addition to the PlayFab username, titles can make use of a DisplayName which is also a unique identifier, but + /// specific to the title. This allows for unique names which more closely match the theme or genre of a title, for example. + /// This API enables changing that name, whether due to a customer request, an offensive name choice, etc. + /// + [Serializable] + public class UpdateUserTitleDisplayNameRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// New title display name for the user - must be between 3 and 25 characters + /// + public string DisplayName; + /// + /// PlayFab unique identifier of the user whose title specific display name is to be changed + /// + public string PlayFabId; + } + + [Serializable] + public class UpdateUserTitleDisplayNameResult : PlayFabResultCommon + { + /// + /// current title display name for the user (this will be the original display name if the rename attempt failed) + /// + public string DisplayName; + } + + [Serializable] + public class UserAccountInfo : PlayFabBaseModel + { + /// + /// User Android device information, if an Android device has been linked + /// + public UserAndroidDeviceInfo AndroidDeviceInfo; + /// + /// Sign in with Apple account information, if an Apple account has been linked + /// + public UserAppleIdInfo AppleAccountInfo; + /// + /// Timestamp indicating when the user account was created + /// + public DateTime Created; + /// + /// Custom ID information, if a custom ID has been assigned + /// + public UserCustomIdInfo CustomIdInfo; + /// + /// User Facebook information, if a Facebook account has been linked + /// + public UserFacebookInfo FacebookInfo; + /// + /// Facebook Instant Games account information, if a Facebook Instant Games account has been linked + /// + public UserFacebookInstantGamesIdInfo FacebookInstantGamesIdInfo; + /// + /// User Gamecenter information, if a Gamecenter account has been linked + /// + public UserGameCenterInfo GameCenterInfo; + /// + /// User Google account information, if a Google account has been linked + /// + public UserGoogleInfo GoogleInfo; + /// + /// User iOS device information, if an iOS device has been linked + /// + public UserIosDeviceInfo IosDeviceInfo; + /// + /// User Kongregate account information, if a Kongregate account has been linked + /// + public UserKongregateInfo KongregateInfo; + /// + /// Nintendo Switch account information, if a Nintendo Switch account has been linked + /// + public UserNintendoSwitchAccountIdInfo NintendoSwitchAccountInfo; + /// + /// Nintendo Switch device information, if a Nintendo Switch device has been linked + /// + public UserNintendoSwitchDeviceIdInfo NintendoSwitchDeviceIdInfo; + /// + /// OpenID Connect information, if any OpenID Connect accounts have been linked + /// + public List OpenIdInfo; + /// + /// Unique identifier for the user account + /// + public string PlayFabId; + /// + /// Personal information for the user which is considered more sensitive + /// + public UserPrivateAccountInfo PrivateInfo; + /// + /// User PSN account information, if a PSN account has been linked + /// + public UserPsnInfo PsnInfo; + /// + /// User Steam information, if a Steam account has been linked + /// + public UserSteamInfo SteamInfo; + /// + /// Title-specific information for the user account + /// + public UserTitleInfo TitleInfo; + /// + /// User Twitch account information, if a Twitch account has been linked + /// + public UserTwitchInfo TwitchInfo; + /// + /// User account name in the PlayFab service + /// + public string Username; + /// + /// User XBox account information, if a XBox account has been linked + /// + public UserXboxInfo XboxInfo; + } + + [Serializable] + public class UserAndroidDeviceInfo : PlayFabBaseModel + { + /// + /// Android device ID + /// + public string AndroidDeviceId; + } + + [Serializable] + public class UserAppleIdInfo : PlayFabBaseModel + { + /// + /// Apple subject ID + /// + public string AppleSubjectId; + } + + [Serializable] + public class UserCustomIdInfo : PlayFabBaseModel + { + /// + /// Custom ID + /// + public string CustomId; + } + + /// + /// Indicates whether a given data key is private (readable only by the player) or public (readable by all players). When a + /// player makes a GetUserData request about another player, only keys marked Public will be returned. + /// + public enum UserDataPermission + { + Private, + Public + } + + [Serializable] + public class UserDataRecord : PlayFabBaseModel + { + /// + /// Timestamp for when this data was last updated. + /// + public DateTime LastUpdated; + /// + /// Indicates whether this data can be read by all users (public) or only the user (private). This is used for GetUserData + /// requests being made by one player about another player. + /// + public UserDataPermission? Permission; + /// + /// Data stored for the specified user data key. + /// + public string Value; + } + + [Serializable] + public class UserFacebookInfo : PlayFabBaseModel + { + /// + /// Facebook identifier + /// + public string FacebookId; + /// + /// Facebook full name + /// + public string FullName; + } + + [Serializable] + public class UserFacebookInstantGamesIdInfo : PlayFabBaseModel + { + /// + /// Facebook Instant Games ID + /// + public string FacebookInstantGamesId; + } + + [Serializable] + public class UserGameCenterInfo : PlayFabBaseModel + { + /// + /// Gamecenter identifier + /// + public string GameCenterId; + } + + [Serializable] + public class UserGoogleInfo : PlayFabBaseModel + { + /// + /// Email address of the Google account + /// + public string GoogleEmail; + /// + /// Gender information of the Google account + /// + public string GoogleGender; + /// + /// Google ID + /// + public string GoogleId; + /// + /// Locale of the Google account + /// + public string GoogleLocale; + /// + /// Name of the Google account user + /// + public string GoogleName; + } + + [Serializable] + public class UserIosDeviceInfo : PlayFabBaseModel + { + /// + /// iOS device ID + /// + public string IosDeviceId; + } + + [Serializable] + public class UserKongregateInfo : PlayFabBaseModel + { + /// + /// Kongregate ID + /// + public string KongregateId; + /// + /// Kongregate Username + /// + public string KongregateName; + } + + [Serializable] + public class UserNintendoSwitchAccountIdInfo : PlayFabBaseModel + { + /// + /// Nintendo Switch account subject ID + /// + public string NintendoSwitchAccountSubjectId; + } + + [Serializable] + public class UserNintendoSwitchDeviceIdInfo : PlayFabBaseModel + { + /// + /// Nintendo Switch Device ID + /// + public string NintendoSwitchDeviceId; + } + + [Serializable] + public class UserOpenIdInfo : PlayFabBaseModel + { + /// + /// OpenID Connection ID + /// + public string ConnectionId; + /// + /// OpenID Issuer + /// + public string Issuer; + /// + /// OpenID Subject + /// + public string Subject; + } + + public enum UserOrigination + { + Organic, + Steam, + Google, + Amazon, + Facebook, + Kongregate, + GamersFirst, + Unknown, + IOS, + LoadTest, + Android, + PSN, + GameCenter, + CustomId, + XboxLive, + Parse, + Twitch, + ServerCustomId, + NintendoSwitchDeviceId, + FacebookInstantGamesId, + OpenIdConnect, + Apple, + NintendoSwitchAccount + } + + [Serializable] + public class UserOriginationSegmentFilter : PlayFabBaseModel + { + /// + /// User login provider. + /// + public SegmentLoginIdentityProvider? LoginProvider; + } + + [Serializable] + public class UserPrivateAccountInfo : PlayFabBaseModel + { + /// + /// user email address + /// + public string Email; + } + + [Serializable] + public class UserPsnInfo : PlayFabBaseModel + { + /// + /// PSN account ID + /// + public string PsnAccountId; + /// + /// PSN online ID + /// + public string PsnOnlineId; + } + + [Serializable] + public class UserSteamInfo : PlayFabBaseModel + { + /// + /// what stage of game ownership the user is listed as being in, from Steam + /// + public TitleActivationStatus? SteamActivationStatus; + /// + /// the country in which the player resides, from Steam data + /// + public string SteamCountry; + /// + /// currency type set in the user Steam account + /// + public Currency? SteamCurrency; + /// + /// Steam identifier + /// + public string SteamId; + /// + /// Steam display name + /// + public string SteamName; + } + + [Serializable] + public class UserTitleInfo : PlayFabBaseModel + { + /// + /// URL to the player's avatar. + /// + public string AvatarUrl; + /// + /// timestamp indicating when the user was first associated with this game (this can differ significantly from when the user + /// first registered with PlayFab) + /// + public DateTime Created; + /// + /// name of the user, as it is displayed in-game + /// + public string DisplayName; + /// + /// timestamp indicating when the user first signed into this game (this can differ from the Created timestamp, as other + /// events, such as issuing a beta key to the user, can associate the title to the user) + /// + public DateTime? FirstLogin; + /// + /// boolean indicating whether or not the user is currently banned for a title + /// + public bool? isBanned; + /// + /// timestamp for the last user login for this title + /// + public DateTime? LastLogin; + /// + /// source by which the user first joined the game, if known + /// + public UserOrigination? Origination; + /// + /// Title player account entity for this user + /// + public EntityKey TitlePlayerAccount; + } + + [Serializable] + public class UserTwitchInfo : PlayFabBaseModel + { + /// + /// Twitch ID + /// + public string TwitchId; + /// + /// Twitch Username + /// + public string TwitchUserName; + } + + [Serializable] + public class UserXboxInfo : PlayFabBaseModel + { + /// + /// XBox user ID + /// + public string XboxUserId; + } + + [Serializable] + public class ValueToDateModel : PlayFabBaseModel + { + /// + /// ISO 4217 code of the currency used in the purchases + /// + public string Currency; + /// + /// Total value of the purchases in a whole number of 1/100 monetary units. For example, 999 indicates nine dollars and + /// ninety-nine cents when Currency is 'USD') + /// + public uint TotalValue; + /// + /// Total value of the purchases in a string representation of decimal monetary units. For example, '9.99' indicates nine + /// dollars and ninety-nine cents when Currency is 'USD'. + /// + public string TotalValueAsDecimal; + } + + [Serializable] + public class ValueToDateSegmentFilter : PlayFabBaseModel + { + /// + /// Value to date amount. + /// + public string Amount; + /// + /// Value to date comparison. + /// + public SegmentFilterComparison? Comparison; + /// + /// Currency using for filter. + /// + public SegmentCurrency? Currency; + } + + [Serializable] + public class VirtualCurrencyBalanceSegmentFilter : PlayFabBaseModel + { + /// + /// Total amount. + /// + public int Amount; + /// + /// Amount comparison. + /// + public SegmentFilterComparison? Comparison; + /// + /// Currency code. + /// + public string CurrencyCode; + } + + [Serializable] + public class VirtualCurrencyData : PlayFabBaseModel + { + /// + /// unique two-character identifier for this currency type (e.g.: "CC") + /// + public string CurrencyCode; + /// + /// friendly name to show in the developer portal, reports, etc. + /// + public string DisplayName; + /// + /// amount to automatically grant users upon first login to the title + /// + public int? InitialDeposit; + /// + /// maximum amount to which the currency will recharge (cannot exceed MaxAmount, but can be less) + /// + public int? RechargeMax; + /// + /// rate at which the currency automatically be added to over time, in units per day (24 hours) + /// + public int? RechargeRate; + } + + [Serializable] + public class VirtualCurrencyRechargeTime : PlayFabBaseModel + { + /// + /// Maximum value to which the regenerating currency will automatically increment. Note that it can exceed this value + /// through use of the AddUserVirtualCurrency API call. However, it will not regenerate automatically until it has fallen + /// below this value. + /// + public int RechargeMax; + /// + /// Server timestamp in UTC indicating the next time the virtual currency will be incremented. + /// + public DateTime RechargeTime; + /// + /// Time remaining (in seconds) before the next recharge increment of the virtual currency. + /// + public int SecondsToRecharge; + } +} +#endif diff --git a/Assets/PlayFabSDK/Admin/PlayFabAdminModels.cs.meta b/Assets/PlayFabSDK/Admin/PlayFabAdminModels.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..985944598dda2e64dd9c1909b99295e80dacc2e5 --- /dev/null +++ b/Assets/PlayFabSDK/Admin/PlayFabAdminModels.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5d7a769446de4b7459591c36c05197ed +timeCreated: 1468524875 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Admin/PlayFabEvents.cs b/Assets/PlayFabSDK/Admin/PlayFabEvents.cs new file mode 100644 index 0000000000000000000000000000000000000000..0514a359857368e7ccf61c67204bd3ab9beaa5ca --- /dev/null +++ b/Assets/PlayFabSDK/Admin/PlayFabEvents.cs @@ -0,0 +1,244 @@ +#if ENABLE_PLAYFABADMIN_API +using PlayFab.AdminModels; + +namespace PlayFab.Events +{ + public partial class PlayFabEvents + { + public event PlayFabRequestEvent OnAdminAbortTaskInstanceRequestEvent; + public event PlayFabResultEvent OnAdminAbortTaskInstanceResultEvent; + public event PlayFabRequestEvent OnAdminAddLocalizedNewsRequestEvent; + public event PlayFabResultEvent OnAdminAddLocalizedNewsResultEvent; + public event PlayFabRequestEvent OnAdminAddNewsRequestEvent; + public event PlayFabResultEvent OnAdminAddNewsResultEvent; + public event PlayFabRequestEvent OnAdminAddPlayerTagRequestEvent; + public event PlayFabResultEvent OnAdminAddPlayerTagResultEvent; + public event PlayFabRequestEvent OnAdminAddServerBuildRequestEvent; + public event PlayFabResultEvent OnAdminAddServerBuildResultEvent; + public event PlayFabRequestEvent OnAdminAddUserVirtualCurrencyRequestEvent; + public event PlayFabResultEvent OnAdminAddUserVirtualCurrencyResultEvent; + public event PlayFabRequestEvent OnAdminAddVirtualCurrencyTypesRequestEvent; + public event PlayFabResultEvent OnAdminAddVirtualCurrencyTypesResultEvent; + public event PlayFabRequestEvent OnAdminBanUsersRequestEvent; + public event PlayFabResultEvent OnAdminBanUsersResultEvent; + public event PlayFabRequestEvent OnAdminCheckLimitedEditionItemAvailabilityRequestEvent; + public event PlayFabResultEvent OnAdminCheckLimitedEditionItemAvailabilityResultEvent; + public event PlayFabRequestEvent OnAdminCreateActionsOnPlayersInSegmentTaskRequestEvent; + public event PlayFabResultEvent OnAdminCreateActionsOnPlayersInSegmentTaskResultEvent; + public event PlayFabRequestEvent OnAdminCreateCloudScriptTaskRequestEvent; + public event PlayFabResultEvent OnAdminCreateCloudScriptTaskResultEvent; + public event PlayFabRequestEvent OnAdminCreateInsightsScheduledScalingTaskRequestEvent; + public event PlayFabResultEvent OnAdminCreateInsightsScheduledScalingTaskResultEvent; + public event PlayFabRequestEvent OnAdminCreateOpenIdConnectionRequestEvent; + public event PlayFabResultEvent OnAdminCreateOpenIdConnectionResultEvent; + public event PlayFabRequestEvent OnAdminCreatePlayerSharedSecretRequestEvent; + public event PlayFabResultEvent OnAdminCreatePlayerSharedSecretResultEvent; + public event PlayFabRequestEvent OnAdminCreatePlayerStatisticDefinitionRequestEvent; + public event PlayFabResultEvent OnAdminCreatePlayerStatisticDefinitionResultEvent; + public event PlayFabRequestEvent OnAdminCreateSegmentRequestEvent; + public event PlayFabResultEvent OnAdminCreateSegmentResultEvent; + public event PlayFabRequestEvent OnAdminDeleteContentRequestEvent; + public event PlayFabResultEvent OnAdminDeleteContentResultEvent; + public event PlayFabRequestEvent OnAdminDeleteMasterPlayerAccountRequestEvent; + public event PlayFabResultEvent OnAdminDeleteMasterPlayerAccountResultEvent; + public event PlayFabRequestEvent OnAdminDeleteOpenIdConnectionRequestEvent; + public event PlayFabResultEvent OnAdminDeleteOpenIdConnectionResultEvent; + public event PlayFabRequestEvent OnAdminDeletePlayerRequestEvent; + public event PlayFabResultEvent OnAdminDeletePlayerResultEvent; + public event PlayFabRequestEvent OnAdminDeletePlayerSharedSecretRequestEvent; + public event PlayFabResultEvent OnAdminDeletePlayerSharedSecretResultEvent; + public event PlayFabRequestEvent OnAdminDeleteSegmentRequestEvent; + public event PlayFabResultEvent OnAdminDeleteSegmentResultEvent; + public event PlayFabRequestEvent OnAdminDeleteStoreRequestEvent; + public event PlayFabResultEvent OnAdminDeleteStoreResultEvent; + public event PlayFabRequestEvent OnAdminDeleteTaskRequestEvent; + public event PlayFabResultEvent OnAdminDeleteTaskResultEvent; + public event PlayFabRequestEvent OnAdminDeleteTitleRequestEvent; + public event PlayFabResultEvent OnAdminDeleteTitleResultEvent; + public event PlayFabRequestEvent OnAdminDeleteTitleDataOverrideRequestEvent; + public event PlayFabResultEvent OnAdminDeleteTitleDataOverrideResultEvent; + public event PlayFabRequestEvent OnAdminExportMasterPlayerDataRequestEvent; + public event PlayFabResultEvent OnAdminExportMasterPlayerDataResultEvent; + public event PlayFabRequestEvent OnAdminGetActionsOnPlayersInSegmentTaskInstanceRequestEvent; + public event PlayFabResultEvent OnAdminGetActionsOnPlayersInSegmentTaskInstanceResultEvent; + public event PlayFabRequestEvent OnAdminGetAllSegmentsRequestEvent; + public event PlayFabResultEvent OnAdminGetAllSegmentsResultEvent; + public event PlayFabRequestEvent OnAdminGetCatalogItemsRequestEvent; + public event PlayFabResultEvent OnAdminGetCatalogItemsResultEvent; + public event PlayFabRequestEvent OnAdminGetCloudScriptRevisionRequestEvent; + public event PlayFabResultEvent OnAdminGetCloudScriptRevisionResultEvent; + public event PlayFabRequestEvent OnAdminGetCloudScriptTaskInstanceRequestEvent; + public event PlayFabResultEvent OnAdminGetCloudScriptTaskInstanceResultEvent; + public event PlayFabRequestEvent OnAdminGetCloudScriptVersionsRequestEvent; + public event PlayFabResultEvent OnAdminGetCloudScriptVersionsResultEvent; + public event PlayFabRequestEvent OnAdminGetContentListRequestEvent; + public event PlayFabResultEvent OnAdminGetContentListResultEvent; + public event PlayFabRequestEvent OnAdminGetContentUploadUrlRequestEvent; + public event PlayFabResultEvent OnAdminGetContentUploadUrlResultEvent; + public event PlayFabRequestEvent OnAdminGetDataReportRequestEvent; + public event PlayFabResultEvent OnAdminGetDataReportResultEvent; + public event PlayFabRequestEvent OnAdminGetMatchmakerGameInfoRequestEvent; + public event PlayFabResultEvent OnAdminGetMatchmakerGameInfoResultEvent; + public event PlayFabRequestEvent OnAdminGetMatchmakerGameModesRequestEvent; + public event PlayFabResultEvent OnAdminGetMatchmakerGameModesResultEvent; + public event PlayFabRequestEvent OnAdminGetPlayedTitleListRequestEvent; + public event PlayFabResultEvent OnAdminGetPlayedTitleListResultEvent; + public event PlayFabRequestEvent OnAdminGetPlayerIdFromAuthTokenRequestEvent; + public event PlayFabResultEvent OnAdminGetPlayerIdFromAuthTokenResultEvent; + public event PlayFabRequestEvent OnAdminGetPlayerProfileRequestEvent; + public event PlayFabResultEvent OnAdminGetPlayerProfileResultEvent; + public event PlayFabRequestEvent OnAdminGetPlayerSegmentsRequestEvent; + public event PlayFabResultEvent OnAdminGetPlayerSegmentsResultEvent; + public event PlayFabRequestEvent OnAdminGetPlayerSharedSecretsRequestEvent; + public event PlayFabResultEvent OnAdminGetPlayerSharedSecretsResultEvent; + public event PlayFabRequestEvent OnAdminGetPlayersInSegmentRequestEvent; + public event PlayFabResultEvent OnAdminGetPlayersInSegmentResultEvent; + public event PlayFabRequestEvent OnAdminGetPlayerStatisticDefinitionsRequestEvent; + public event PlayFabResultEvent OnAdminGetPlayerStatisticDefinitionsResultEvent; + public event PlayFabRequestEvent OnAdminGetPlayerStatisticVersionsRequestEvent; + public event PlayFabResultEvent OnAdminGetPlayerStatisticVersionsResultEvent; + public event PlayFabRequestEvent OnAdminGetPlayerTagsRequestEvent; + public event PlayFabResultEvent OnAdminGetPlayerTagsResultEvent; + public event PlayFabRequestEvent OnAdminGetPolicyRequestEvent; + public event PlayFabResultEvent OnAdminGetPolicyResultEvent; + public event PlayFabRequestEvent OnAdminGetPublisherDataRequestEvent; + public event PlayFabResultEvent OnAdminGetPublisherDataResultEvent; + public event PlayFabRequestEvent OnAdminGetRandomResultTablesRequestEvent; + public event PlayFabResultEvent OnAdminGetRandomResultTablesResultEvent; + public event PlayFabRequestEvent OnAdminGetSegmentsRequestEvent; + public event PlayFabResultEvent OnAdminGetSegmentsResultEvent; + public event PlayFabRequestEvent OnAdminGetServerBuildInfoRequestEvent; + public event PlayFabResultEvent OnAdminGetServerBuildInfoResultEvent; + public event PlayFabRequestEvent OnAdminGetServerBuildUploadUrlRequestEvent; + public event PlayFabResultEvent OnAdminGetServerBuildUploadUrlResultEvent; + public event PlayFabRequestEvent OnAdminGetStoreItemsRequestEvent; + public event PlayFabResultEvent OnAdminGetStoreItemsResultEvent; + public event PlayFabRequestEvent OnAdminGetTaskInstancesRequestEvent; + public event PlayFabResultEvent OnAdminGetTaskInstancesResultEvent; + public event PlayFabRequestEvent OnAdminGetTasksRequestEvent; + public event PlayFabResultEvent OnAdminGetTasksResultEvent; + public event PlayFabRequestEvent OnAdminGetTitleDataRequestEvent; + public event PlayFabResultEvent OnAdminGetTitleDataResultEvent; + public event PlayFabRequestEvent OnAdminGetTitleInternalDataRequestEvent; + public event PlayFabResultEvent OnAdminGetTitleInternalDataResultEvent; + public event PlayFabRequestEvent OnAdminGetUserAccountInfoRequestEvent; + public event PlayFabResultEvent OnAdminGetUserAccountInfoResultEvent; + public event PlayFabRequestEvent OnAdminGetUserBansRequestEvent; + public event PlayFabResultEvent OnAdminGetUserBansResultEvent; + public event PlayFabRequestEvent OnAdminGetUserDataRequestEvent; + public event PlayFabResultEvent OnAdminGetUserDataResultEvent; + public event PlayFabRequestEvent OnAdminGetUserInternalDataRequestEvent; + public event PlayFabResultEvent OnAdminGetUserInternalDataResultEvent; + public event PlayFabRequestEvent OnAdminGetUserInventoryRequestEvent; + public event PlayFabResultEvent OnAdminGetUserInventoryResultEvent; + public event PlayFabRequestEvent OnAdminGetUserPublisherDataRequestEvent; + public event PlayFabResultEvent OnAdminGetUserPublisherDataResultEvent; + public event PlayFabRequestEvent OnAdminGetUserPublisherInternalDataRequestEvent; + public event PlayFabResultEvent OnAdminGetUserPublisherInternalDataResultEvent; + public event PlayFabRequestEvent OnAdminGetUserPublisherReadOnlyDataRequestEvent; + public event PlayFabResultEvent OnAdminGetUserPublisherReadOnlyDataResultEvent; + public event PlayFabRequestEvent OnAdminGetUserReadOnlyDataRequestEvent; + public event PlayFabResultEvent OnAdminGetUserReadOnlyDataResultEvent; + public event PlayFabRequestEvent OnAdminGrantItemsToUsersRequestEvent; + public event PlayFabResultEvent OnAdminGrantItemsToUsersResultEvent; + public event PlayFabRequestEvent OnAdminIncrementLimitedEditionItemAvailabilityRequestEvent; + public event PlayFabResultEvent OnAdminIncrementLimitedEditionItemAvailabilityResultEvent; + public event PlayFabRequestEvent OnAdminIncrementPlayerStatisticVersionRequestEvent; + public event PlayFabResultEvent OnAdminIncrementPlayerStatisticVersionResultEvent; + public event PlayFabRequestEvent OnAdminListOpenIdConnectionRequestEvent; + public event PlayFabResultEvent OnAdminListOpenIdConnectionResultEvent; + public event PlayFabRequestEvent OnAdminListServerBuildsRequestEvent; + public event PlayFabResultEvent OnAdminListServerBuildsResultEvent; + public event PlayFabRequestEvent OnAdminListVirtualCurrencyTypesRequestEvent; + public event PlayFabResultEvent OnAdminListVirtualCurrencyTypesResultEvent; + public event PlayFabRequestEvent OnAdminModifyMatchmakerGameModesRequestEvent; + public event PlayFabResultEvent OnAdminModifyMatchmakerGameModesResultEvent; + public event PlayFabRequestEvent OnAdminModifyServerBuildRequestEvent; + public event PlayFabResultEvent OnAdminModifyServerBuildResultEvent; + public event PlayFabRequestEvent OnAdminRefundPurchaseRequestEvent; + public event PlayFabResultEvent OnAdminRefundPurchaseResultEvent; + public event PlayFabRequestEvent OnAdminRemovePlayerTagRequestEvent; + public event PlayFabResultEvent OnAdminRemovePlayerTagResultEvent; + public event PlayFabRequestEvent OnAdminRemoveServerBuildRequestEvent; + public event PlayFabResultEvent OnAdminRemoveServerBuildResultEvent; + public event PlayFabRequestEvent OnAdminRemoveVirtualCurrencyTypesRequestEvent; + public event PlayFabResultEvent OnAdminRemoveVirtualCurrencyTypesResultEvent; + public event PlayFabRequestEvent OnAdminResetCharacterStatisticsRequestEvent; + public event PlayFabResultEvent OnAdminResetCharacterStatisticsResultEvent; + public event PlayFabRequestEvent OnAdminResetPasswordRequestEvent; + public event PlayFabResultEvent OnAdminResetPasswordResultEvent; + public event PlayFabRequestEvent OnAdminResetUserStatisticsRequestEvent; + public event PlayFabResultEvent OnAdminResetUserStatisticsResultEvent; + public event PlayFabRequestEvent OnAdminResolvePurchaseDisputeRequestEvent; + public event PlayFabResultEvent OnAdminResolvePurchaseDisputeResultEvent; + public event PlayFabRequestEvent OnAdminRevokeAllBansForUserRequestEvent; + public event PlayFabResultEvent OnAdminRevokeAllBansForUserResultEvent; + public event PlayFabRequestEvent OnAdminRevokeBansRequestEvent; + public event PlayFabResultEvent OnAdminRevokeBansResultEvent; + public event PlayFabRequestEvent OnAdminRevokeInventoryItemRequestEvent; + public event PlayFabResultEvent OnAdminRevokeInventoryItemResultEvent; + public event PlayFabRequestEvent OnAdminRevokeInventoryItemsRequestEvent; + public event PlayFabResultEvent OnAdminRevokeInventoryItemsResultEvent; + public event PlayFabRequestEvent OnAdminRunTaskRequestEvent; + public event PlayFabResultEvent OnAdminRunTaskResultEvent; + public event PlayFabRequestEvent OnAdminSendAccountRecoveryEmailRequestEvent; + public event PlayFabResultEvent OnAdminSendAccountRecoveryEmailResultEvent; + public event PlayFabRequestEvent OnAdminSetCatalogItemsRequestEvent; + public event PlayFabResultEvent OnAdminSetCatalogItemsResultEvent; + public event PlayFabRequestEvent OnAdminSetPlayerSecretRequestEvent; + public event PlayFabResultEvent OnAdminSetPlayerSecretResultEvent; + public event PlayFabRequestEvent OnAdminSetPublishedRevisionRequestEvent; + public event PlayFabResultEvent OnAdminSetPublishedRevisionResultEvent; + public event PlayFabRequestEvent OnAdminSetPublisherDataRequestEvent; + public event PlayFabResultEvent OnAdminSetPublisherDataResultEvent; + public event PlayFabRequestEvent OnAdminSetStoreItemsRequestEvent; + public event PlayFabResultEvent OnAdminSetStoreItemsResultEvent; + public event PlayFabRequestEvent OnAdminSetTitleDataRequestEvent; + public event PlayFabResultEvent OnAdminSetTitleDataResultEvent; + public event PlayFabRequestEvent OnAdminSetTitleDataAndOverridesRequestEvent; + public event PlayFabResultEvent OnAdminSetTitleDataAndOverridesResultEvent; + public event PlayFabRequestEvent OnAdminSetTitleInternalDataRequestEvent; + public event PlayFabResultEvent OnAdminSetTitleInternalDataResultEvent; + public event PlayFabRequestEvent OnAdminSetupPushNotificationRequestEvent; + public event PlayFabResultEvent OnAdminSetupPushNotificationResultEvent; + public event PlayFabRequestEvent OnAdminSubtractUserVirtualCurrencyRequestEvent; + public event PlayFabResultEvent OnAdminSubtractUserVirtualCurrencyResultEvent; + public event PlayFabRequestEvent OnAdminUpdateBansRequestEvent; + public event PlayFabResultEvent OnAdminUpdateBansResultEvent; + public event PlayFabRequestEvent OnAdminUpdateCatalogItemsRequestEvent; + public event PlayFabResultEvent OnAdminUpdateCatalogItemsResultEvent; + public event PlayFabRequestEvent OnAdminUpdateCloudScriptRequestEvent; + public event PlayFabResultEvent OnAdminUpdateCloudScriptResultEvent; + public event PlayFabRequestEvent OnAdminUpdateOpenIdConnectionRequestEvent; + public event PlayFabResultEvent OnAdminUpdateOpenIdConnectionResultEvent; + public event PlayFabRequestEvent OnAdminUpdatePlayerSharedSecretRequestEvent; + public event PlayFabResultEvent OnAdminUpdatePlayerSharedSecretResultEvent; + public event PlayFabRequestEvent OnAdminUpdatePlayerStatisticDefinitionRequestEvent; + public event PlayFabResultEvent OnAdminUpdatePlayerStatisticDefinitionResultEvent; + public event PlayFabRequestEvent OnAdminUpdatePolicyRequestEvent; + public event PlayFabResultEvent OnAdminUpdatePolicyResultEvent; + public event PlayFabRequestEvent OnAdminUpdateRandomResultTablesRequestEvent; + public event PlayFabResultEvent OnAdminUpdateRandomResultTablesResultEvent; + public event PlayFabRequestEvent OnAdminUpdateSegmentRequestEvent; + public event PlayFabResultEvent OnAdminUpdateSegmentResultEvent; + public event PlayFabRequestEvent OnAdminUpdateStoreItemsRequestEvent; + public event PlayFabResultEvent OnAdminUpdateStoreItemsResultEvent; + public event PlayFabRequestEvent OnAdminUpdateTaskRequestEvent; + public event PlayFabResultEvent OnAdminUpdateTaskResultEvent; + public event PlayFabRequestEvent OnAdminUpdateUserDataRequestEvent; + public event PlayFabResultEvent OnAdminUpdateUserDataResultEvent; + public event PlayFabRequestEvent OnAdminUpdateUserInternalDataRequestEvent; + public event PlayFabResultEvent OnAdminUpdateUserInternalDataResultEvent; + public event PlayFabRequestEvent OnAdminUpdateUserPublisherDataRequestEvent; + public event PlayFabResultEvent OnAdminUpdateUserPublisherDataResultEvent; + public event PlayFabRequestEvent OnAdminUpdateUserPublisherInternalDataRequestEvent; + public event PlayFabResultEvent OnAdminUpdateUserPublisherInternalDataResultEvent; + public event PlayFabRequestEvent OnAdminUpdateUserPublisherReadOnlyDataRequestEvent; + public event PlayFabResultEvent OnAdminUpdateUserPublisherReadOnlyDataResultEvent; + public event PlayFabRequestEvent OnAdminUpdateUserReadOnlyDataRequestEvent; + public event PlayFabResultEvent OnAdminUpdateUserReadOnlyDataResultEvent; + public event PlayFabRequestEvent OnAdminUpdateUserTitleDisplayNameRequestEvent; + public event PlayFabResultEvent OnAdminUpdateUserTitleDisplayNameResultEvent; + } +} +#endif diff --git a/Assets/PlayFabSDK/Admin/PlayFabEvents.cs.meta b/Assets/PlayFabSDK/Admin/PlayFabEvents.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..6cca88a72702e58ff5349e74306dab53400d421d --- /dev/null +++ b/Assets/PlayFabSDK/Admin/PlayFabEvents.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 17d913d4a2b01d044a0f70f2679f2fca +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Authentication.meta b/Assets/PlayFabSDK/Authentication.meta new file mode 100644 index 0000000000000000000000000000000000000000..5a285357d00a95b6e1f34bff1a62852c2e479872 --- /dev/null +++ b/Assets/PlayFabSDK/Authentication.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 14f4be27db90b5d408494e5a681a55f6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationAPI.cs b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationAPI.cs new file mode 100644 index 0000000000000000000000000000000000000000..487522cb74a112ce2fc47baef34b05b5fb08fd07 --- /dev/null +++ b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationAPI.cs @@ -0,0 +1,77 @@ +#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFAB_STATIC_API + +using System; +using System.Collections.Generic; +using PlayFab.AuthenticationModels; +using PlayFab.Internal; + +namespace PlayFab +{ + /// + /// The Authentication APIs provide a convenient way to convert classic authentication responses into entity authentication + /// models. These APIs will provide you with the entity authentication token needed for subsequent Entity API calls. Manage + /// API keys for authenticating any entity. + /// + public static class PlayFabAuthenticationAPI + { + static PlayFabAuthenticationAPI() {} + + + /// + /// Verify entity login. + /// + public static bool IsEntityLoggedIn() + { + return PlayFabSettings.staticPlayer.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public static void ForgetAllCredentials() + { + PlayFabSettings.staticPlayer.ForgetAllCredentials(); + } + + /// + /// Method to exchange a legacy AuthenticationTicket or title SecretKey for an Entity Token or to refresh a still valid + /// Entity Token. + /// + public static void GetEntityToken(GetEntityTokenRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + AuthType authType = AuthType.None; +#if !DISABLE_PLAYFABCLIENT_API + if (context.IsClientLoggedIn()) { authType = AuthType.LoginSession; } +#endif +#if ENABLE_PLAYFABSERVER_API || ENABLE_PLAYFABADMIN_API + if (callSettings.DeveloperSecretKey != null) { authType = AuthType.DevSecretKey; } +#endif +#if !DISABLE_PLAYFABENTITY_API + if (context.IsEntityLoggedIn()) { authType = AuthType.EntityToken; } +#endif + + + PlayFabHttp.MakeApiCall("/Authentication/GetEntityToken", request, authType, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Method for a server to validate a client provided EntityToken. Only callable by the title entity. + /// + public static void ValidateEntityToken(ValidateEntityTokenRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Authentication/ValidateEntityToken", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationAPI.cs.meta b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationAPI.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..d24442f17e663a977d9952e939d67a9e8d8fc54d --- /dev/null +++ b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cf5e0beea20361a45aee9c2329eafd01 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationInstanceAPI.cs b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationInstanceAPI.cs new file mode 100644 index 0000000000000000000000000000000000000000..25b9712af8269c619e31d4284f315b1ad8c855f9 --- /dev/null +++ b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationInstanceAPI.cs @@ -0,0 +1,98 @@ +#if !DISABLE_PLAYFABENTITY_API + +using System; +using System.Collections.Generic; +using PlayFab.AuthenticationModels; +using PlayFab.Internal; +using PlayFab.SharedModels; + +namespace PlayFab +{ + /// + /// The Authentication APIs provide a convenient way to convert classic authentication responses into entity authentication + /// models. These APIs will provide you with the entity authentication token needed for subsequent Entity API calls. Manage + /// API keys for authenticating any entity. + /// + public class PlayFabAuthenticationInstanceAPI : IPlayFabInstanceApi + { + public readonly PlayFabApiSettings apiSettings = null; + public readonly PlayFabAuthenticationContext authenticationContext = null; + + public PlayFabAuthenticationInstanceAPI() + { + authenticationContext = new PlayFabAuthenticationContext(); + } + + public PlayFabAuthenticationInstanceAPI(PlayFabApiSettings settings) + { + apiSettings = settings; + authenticationContext = new PlayFabAuthenticationContext(); + } + + public PlayFabAuthenticationInstanceAPI(PlayFabAuthenticationContext context) + { + authenticationContext = context ?? new PlayFabAuthenticationContext(); + } + + public PlayFabAuthenticationInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context) + { + apiSettings = settings; + authenticationContext = context ?? new PlayFabAuthenticationContext(); + } + + /// + /// Verify entity login. + /// + public bool IsEntityLoggedIn() + { + return authenticationContext == null ? false : authenticationContext.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public void ForgetAllCredentials() + { + if (authenticationContext != null) + { + authenticationContext.ForgetAllCredentials(); + } + } + + /// + /// Method to exchange a legacy AuthenticationTicket or title SecretKey for an Entity Token or to refresh a still valid + /// Entity Token. + /// + public void GetEntityToken(GetEntityTokenRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + AuthType authType = AuthType.None; +#if !DISABLE_PLAYFABCLIENT_API + if (context.IsClientLoggedIn()) { authType = AuthType.LoginSession; } +#endif +#if ENABLE_PLAYFABSERVER_API || ENABLE_PLAYFABADMIN_API + if (callSettings.DeveloperSecretKey != null) { authType = AuthType.DevSecretKey; } +#endif +#if !DISABLE_PLAYFABENTITY_API + if (context.IsEntityLoggedIn()) { authType = AuthType.EntityToken; } +#endif + PlayFabHttp.MakeApiCall("/Authentication/GetEntityToken", request, authType, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Method for a server to validate a client provided EntityToken. Only callable by the title entity. + /// + public void ValidateEntityToken(ValidateEntityTokenRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Authentication/ValidateEntityToken", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationInstanceAPI.cs.meta b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationInstanceAPI.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..a10fd8d6580fe0446e8966727242dbe8d60938f0 --- /dev/null +++ b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationInstanceAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ecff04cca276a454aad3baf64c4a2ab4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationModels.cs b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationModels.cs new file mode 100644 index 0000000000000000000000000000000000000000..c8fc84c04cacf9f8450290cb35a0150c5fe53f35 --- /dev/null +++ b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationModels.cs @@ -0,0 +1,159 @@ +#if !DISABLE_PLAYFABENTITY_API +using System; +using System.Collections.Generic; +using PlayFab.SharedModels; + +namespace PlayFab.AuthenticationModels +{ + /// + /// Combined entity type and ID structure which uniquely identifies a single entity. + /// + [Serializable] + public class EntityKey : PlayFabBaseModel + { + /// + /// Unique ID of the entity. + /// + public string Id; + /// + /// Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types + /// + public string Type; + } + + [Serializable] + public class EntityLineage : PlayFabBaseModel + { + /// + /// The Character Id of the associated entity. + /// + public string CharacterId; + /// + /// The Group Id of the associated entity. + /// + public string GroupId; + /// + /// The Master Player Account Id of the associated entity. + /// + public string MasterPlayerAccountId; + /// + /// The Namespace Id of the associated entity. + /// + public string NamespaceId; + /// + /// The Title Id of the associated entity. + /// + public string TitleId; + /// + /// The Title Player Account Id of the associated entity. + /// + public string TitlePlayerAccountId; + } + + /// + /// This API must be called with X-SecretKey, X-Authentication or X-EntityToken headers. An optional EntityKey may be + /// included to attempt to set the resulting EntityToken to a specific entity, however the entity must be a relation of the + /// caller, such as the master_player_account of a character. If sending X-EntityToken the account will be marked as freshly + /// logged in and will issue a new token. If using X-Authentication or X-EntityToken the header must still be valid and + /// cannot be expired or revoked. + /// + [Serializable] + public class GetEntityTokenRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + } + + [Serializable] + public class GetEntityTokenResponse : PlayFabResultCommon + { + /// + /// The entity id and type. + /// + public EntityKey Entity; + /// + /// The token used to set X-EntityToken for all entity based API calls. + /// + public string EntityToken; + /// + /// The time the token will expire, if it is an expiring token, in UTC. + /// + public DateTime? TokenExpiration; + } + + public enum IdentifiedDeviceType + { + Unknown, + XboxOne, + Scarlett + } + + public enum LoginIdentityProvider + { + Unknown, + PlayFab, + Custom, + GameCenter, + GooglePlay, + Steam, + XBoxLive, + PSN, + Kongregate, + Facebook, + IOSDevice, + AndroidDevice, + Twitch, + WindowsHello, + GameServer, + CustomServer, + NintendoSwitch, + FacebookInstantGames, + OpenIdConnect, + Apple, + NintendoSwitchAccount + } + + /// + /// Given an entity token, validates that it hasn't expired or been revoked and will return details of the owner. + /// + [Serializable] + public class ValidateEntityTokenRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Client EntityToken + /// + public string EntityToken; + } + + [Serializable] + public class ValidateEntityTokenResponse : PlayFabResultCommon + { + /// + /// The entity id and type. + /// + public EntityKey Entity; + /// + /// The authenticated device for this entity, for the given login + /// + public IdentifiedDeviceType? IdentifiedDeviceType; + /// + /// The identity provider for this entity, for the given login + /// + public LoginIdentityProvider? IdentityProvider; + /// + /// The lineage of this profile. + /// + public EntityLineage Lineage; + } +} +#endif diff --git a/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationModels.cs.meta b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationModels.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..defcd58c91ed3a0feb034dd8f4b71713ecf29842 --- /dev/null +++ b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationModels.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ec656500f922b0b4db8e13c80770e0d5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Authentication/PlayFabEvents.cs b/Assets/PlayFabSDK/Authentication/PlayFabEvents.cs new file mode 100644 index 0000000000000000000000000000000000000000..94567e8ceeff23272c81ace11e7cab9b0f1c8049 --- /dev/null +++ b/Assets/PlayFabSDK/Authentication/PlayFabEvents.cs @@ -0,0 +1,14 @@ +#if !DISABLE_PLAYFABENTITY_API +using PlayFab.AuthenticationModels; + +namespace PlayFab.Events +{ + public partial class PlayFabEvents + { + public event PlayFabRequestEvent OnAuthenticationGetEntityTokenRequestEvent; + public event PlayFabResultEvent OnAuthenticationGetEntityTokenResultEvent; + public event PlayFabRequestEvent OnAuthenticationValidateEntityTokenRequestEvent; + public event PlayFabResultEvent OnAuthenticationValidateEntityTokenResultEvent; + } +} +#endif diff --git a/Assets/PlayFabSDK/Authentication/PlayFabEvents.cs.meta b/Assets/PlayFabSDK/Authentication/PlayFabEvents.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..8ba2d25fda8806dc434cc4569e95556373175386 --- /dev/null +++ b/Assets/PlayFabSDK/Authentication/PlayFabEvents.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5c3701fef92515c438633c5d41bf87c8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Client.meta b/Assets/PlayFabSDK/Client.meta new file mode 100644 index 0000000000000000000000000000000000000000..c4bdb8f703c47a50c510c95668174c2b7215fb88 --- /dev/null +++ b/Assets/PlayFabSDK/Client.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ea91f77d2459767449ffe7e92185faa3 +folderAsset: yes +timeCreated: 1468524875 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Client/PlayFabClientAPI.cs b/Assets/PlayFabSDK/Client/PlayFabClientAPI.cs new file mode 100644 index 0000000000000000000000000000000000000000..8e46724c20e2cd6542ff6c769c260f36916819f5 --- /dev/null +++ b/Assets/PlayFabSDK/Client/PlayFabClientAPI.cs @@ -0,0 +1,2264 @@ +#if !DISABLE_PLAYFABCLIENT_API && !DISABLE_PLAYFAB_STATIC_API + +using System; +using System.Collections.Generic; +using PlayFab.ClientModels; +using PlayFab.Internal; + +namespace PlayFab +{ + /// + /// APIs which provide the full range of PlayFab features available to the client - authentication, account and data + /// management, inventory, friends, matchmaking, reporting, and platform-specific functionality + /// + public static class PlayFabClientAPI + { + static PlayFabClientAPI() {} + + /// + /// Verify client login. + /// + public static bool IsClientLoggedIn() + { + return PlayFabSettings.staticPlayer.IsClientLoggedIn(); + } + + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public static void ForgetAllCredentials() + { + PlayFabSettings.staticPlayer.ForgetAllCredentials(); + } + + /// + /// Accepts an open trade (one that has not yet been accepted or cancelled), if the locally signed-in player is in the + /// allowed player list for the trade, or it is open to all players. If the call is successful, the offered and accepted + /// items will be swapped between the two players' inventories. + /// + public static void AcceptTrade(AcceptTradeRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/AcceptTrade", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds the PlayFab user, based upon a match against a supplied unique identifier, to the friend list of the local user. At + /// least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized. + /// + public static void AddFriend(AddFriendRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/AddFriend", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds the specified generic service identifier to the player's PlayFab account. This is designed to allow for a PlayFab + /// ID lookup of any arbitrary service identifier a title wants to add. This identifier should never be used as + /// authentication credentials, as the intent is that it is easily accessible by other players. + /// + public static void AddGenericID(AddGenericIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/AddGenericID", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds or updates a contact email to the player's profile. + /// + public static void AddOrUpdateContactEmail(AddOrUpdateContactEmailRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/AddOrUpdateContactEmail", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds users to the set of those able to update both the shared data, as well as the set of users in the group. Only users + /// in the group can add new members. Shared Groups are designed for sharing data between a very small number of players, + /// please see our guide: https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public static void AddSharedGroupMembers(AddSharedGroupMembersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/AddSharedGroupMembers", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds playfab username/password auth to an existing account created via an anonymous auth method, e.g. automatic device + /// ID login. + /// + public static void AddUsernamePassword(AddUsernamePasswordRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/AddUsernamePassword", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Increments the user's balance of the specified virtual currency by the stated amount + /// + public static void AddUserVirtualCurrency(AddUserVirtualCurrencyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/AddUserVirtualCurrency", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Registers the Android device to receive push notifications + /// + public static void AndroidDevicePushNotificationRegistration(AndroidDevicePushNotificationRegistrationRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/AndroidDevicePushNotificationRegistration", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Attributes an install for advertisment. + /// + public static void AttributeInstall(AttributeInstallRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/AttributeInstall", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Cancels an open trade (one that has not yet been accepted or cancelled). Note that only the player who created the trade + /// can cancel it via this API call, to prevent griefing of the trade system (cancelling trades in order to prevent other + /// players from accepting them, for trades that can be claimed by more than one player). + /// + public static void CancelTrade(CancelTradeRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/CancelTrade", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Confirms with the payment provider that the purchase was approved (if applicable) and adjusts inventory and virtual + /// currency balances as appropriate + /// + public static void ConfirmPurchase(ConfirmPurchaseRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/ConfirmPurchase", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Consume uses of a consumable item. When all uses are consumed, it will be removed from the player's inventory. + /// + public static void ConsumeItem(ConsumeItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/ConsumeItem", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Grants the player's current entitlements from Microsoft Store's Collection API + /// + public static void ConsumeMicrosoftStoreEntitlements(ConsumeMicrosoftStoreEntitlementsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/ConsumeMicrosoftStoreEntitlements", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Checks for any new PS5 entitlements. If any are found, they are consumed (if they're consumables) and added as PlayFab + /// items + /// + public static void ConsumePS5Entitlements(ConsumePS5EntitlementsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/ConsumePS5Entitlements", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Checks for any new consumable entitlements. If any are found, they are consumed and added as PlayFab items + /// + public static void ConsumePSNEntitlements(ConsumePSNEntitlementsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/ConsumePSNEntitlements", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Grants the player's current entitlements from Xbox Live, consuming all availble items in Xbox and granting them to the + /// player's PlayFab inventory. This call is idempotent and will not grant previously granted items to the player. + /// + public static void ConsumeXboxEntitlements(ConsumeXboxEntitlementsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/ConsumeXboxEntitlements", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Requests the creation of a shared group object, containing key/value pairs which may be updated by all members of the + /// group. Upon creation, the current user will be the only member of the group. Shared Groups are designed for sharing data + /// between a very small number of players, please see our guide: + /// https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public static void CreateSharedGroup(CreateSharedGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/CreateSharedGroup", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Executes a CloudScript function, with the 'currentPlayerId' set to the PlayFab ID of the authenticated player. + /// + public static void ExecuteCloudScript(ExecuteCloudScriptRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/ExecuteCloudScript", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + public static void ExecuteCloudScript(ExecuteCloudScriptRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn, "Must be logged in to call this method"); + Action wrappedResultCallback = (wrappedResult) => + { + var serializer = PluginManager.GetPlugin(PluginContract.PlayFab_Serializer); + var wrappedJson = serializer.SerializeObject(wrappedResult.FunctionResult); + try { + wrappedResult.FunctionResult = serializer.DeserializeObject(wrappedJson); + } catch (Exception) { + wrappedResult.FunctionResult = wrappedJson; + wrappedResult.Logs.Add(new LogStatement { Level = "Warning", Data = wrappedJson, Message = "Sdk Message: Could not deserialize result as: " + typeof(TOut).Name }); + } + resultCallback(wrappedResult); + }; + PlayFabHttp.MakeApiCall("/Client/ExecuteCloudScript", request, AuthType.LoginSession, wrappedResultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the user's PlayFab account details + /// + public static void GetAccountInfo(GetAccountInfoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetAccountInfo", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Returns a list of ad placements and a reward for each + /// + public static void GetAdPlacements(GetAdPlacementsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetAdPlacements", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be + /// evaluated with the parent PlayFabId to guarantee uniqueness. + /// + public static void GetAllUsersCharacters(ListUsersCharactersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetAllUsersCharacters", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the specified version of the title's catalog of virtual goods, including all defined properties + /// + public static void GetCatalogItems(GetCatalogItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetCatalogItems", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the title-specific custom data for the character which is readable and writable by the client + /// + public static void GetCharacterData(GetCharacterDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetCharacterData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the specified character's current inventory of virtual goods + /// + public static void GetCharacterInventory(GetCharacterInventoryRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetCharacterInventory", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a list of ranked characters for the given statistic, starting from the indicated point in the leaderboard + /// + public static void GetCharacterLeaderboard(GetCharacterLeaderboardRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetCharacterLeaderboard", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the title-specific custom data for the character which can only be read by the client + /// + public static void GetCharacterReadOnlyData(GetCharacterDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetCharacterReadOnlyData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the details of all title-specific statistics for the user + /// + public static void GetCharacterStatistics(GetCharacterStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetCharacterStatistics", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// This API retrieves a pre-signed URL for accessing a content file for the title. A subsequent HTTP GET to the returned + /// URL will attempt to download the content. A HEAD query to the returned URL will attempt to retrieve the metadata of the + /// content. Note that a successful result does not guarantee the existence of this content - if it has not been uploaded, + /// the query to retrieve the data will fail. See this post for more information: + /// https://community.playfab.com/hc/community/posts/205469488-How-to-upload-files-to-PlayFab-s-Content-Service. Also, + /// please be aware that the Content service is specifically PlayFab's CDN offering, for which standard CDN rates apply. + /// + public static void GetContentDownloadUrl(GetContentDownloadUrlRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetContentDownloadUrl", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get details about all current running game servers matching the given parameters. + /// + public static void GetCurrentGames(CurrentGamesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetCurrentGames", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a list of ranked friends of the current player for the given statistic, starting from the indicated point in + /// the leaderboard + /// + public static void GetFriendLeaderboard(GetFriendLeaderboardRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetFriendLeaderboard", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a list of ranked friends of the current player for the given statistic, centered on the requested PlayFab + /// user. If PlayFabId is empty or null will return currently logged in user. + /// + public static void GetFriendLeaderboardAroundPlayer(GetFriendLeaderboardAroundPlayerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetFriendLeaderboardAroundPlayer", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the current friend list for the local user, constrained to users who have PlayFab accounts. Friends from + /// linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends. + /// + public static void GetFriendsList(GetFriendsListRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetFriendsList", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get details about the regions hosting game servers matching the given parameters. + /// + public static void GetGameServerRegions(GameServerRegionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetGameServerRegions", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a list of ranked users for the given statistic, starting from the indicated point in the leaderboard + /// + public static void GetLeaderboard(GetLeaderboardRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetLeaderboard", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a list of ranked characters for the given statistic, centered on the requested Character ID + /// + public static void GetLeaderboardAroundCharacter(GetLeaderboardAroundCharacterRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetLeaderboardAroundCharacter", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a list of ranked users for the given statistic, centered on the requested player. If PlayFabId is empty or + /// null will return currently logged in user. + /// + public static void GetLeaderboardAroundPlayer(GetLeaderboardAroundPlayerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetLeaderboardAroundPlayer", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a list of all of the user's characters for the given statistic. + /// + public static void Ge