I make a login scene and it works fine. And then I click play button to go to a gameplay scene. In gameplay scene I wrote code to execute cloud script, but it failed. Is it because I lost my login status?
PlayFab.ClientModels.ScriptExecutionError -- The script called a PlayFab API, which returned an error. See the Error logs for details. UnityEngine.Debug:LogError(Object) Ingredient:OnGetThisIngredientCallback(ExecuteCloudScriptResult) (at Assets/Scripts/GameObjects/Ingredient.cs:132) PlayFab.Internal.<MakeApiCall>c__AnonStorey1A`1:<>m__28() (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabHTTP.cs:165) PlayFab.Internal.<MakeApiCall>c__AnonStorey1B:<>m__29(String) (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWWW.cs:126) PlayFab.Internal.<Post>c__Iterator7:MoveNext() (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWWW.cs:200) UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
Answer by Brendan · Jan 11 at 09:23 AM
No, if you're able to call a Cloud Script at all, you have a current Session Ticket. In this case, what specifically are you passing in for the ItemID? One thing I'd recommend is using try/catch to capture any issues with calling into Server API methods, so that you can return additional context to the calling client.