Can someone tell me if I am going crazy? My code gets to this point where the breakpoint is, but the call is not executed. Neither of the callback functions are ever reached. Any ideas?
Can someone tell me if I am going crazy? My code gets to this point where the breakpoint is, but the call is not executed. Neither of the callback functions are ever reached. Any ideas?
The execution of your code would pause at the breakpoint before the code on that line is executed. In your case, the API ValidateEntityToken hasn't been called because the statement in red hasn't yet executed. Please navigate to the docs -- Use breakpoints in the Visual Studio debugger to learn more about the use of breakpoints.
I put the breakpoint there because I wanted to see exactly what was happening. I wasn't being clear; this is server side code and the I was unaware ValidateEntityToken had to be called by a logged-in user. The code was throwing a runtime error that was not showing up in the Unity Editor, so ValidateEntityToken was never called, and therefore neither of the callback functions were called.
Thanks for clarifying. If so, you can try to call ValidateEntityToken API after you have called GetEntityToken API.
There may be something wrong with my environemnt. No PlayFab calls are working. When I set breakpoints in PlayFab API source code, they are not hit and the breakpoints have this warning message in VS: "The breakpoint will not currently be hit. Unable to find a corresponding location".
Surrounding a playfab call in a try-catch catches the error "System.NullReferenceException: Object reference not set to an instance of an object" at line 22.
I have all of the PlayFabSdk and I can drill into PlayFab API classes, so I don't know why I am getting these errors. Any ideas?
Couldn't reply to your other comment, but after removing the "()", I still get the same error. I am very confused. I updated unity to it's latest version and none of the PlayFab directives could be found even though I had the SDK in my Assets folder. After downgrading, it can find the directives but I still get the above error. I'm wondering if in the older version of Unity I was using, the PlayFab dependencies couldn't be found but it wasn't indicated anywhere. It seems to be the case in the newer version of Unity I tried. After creating a new project and importing PlayFabSDK again, it still cannot be found in Visual Studio. No idea where to go from here.
Could you please try to reinstall the development environment, such as Visual Studio or OS, for troubleshooting?
PlayFab SDK has been verified to be usable in the latest Unity version with several Visual Studio versions. Such questions about configurations of development environments, please navigate to the Unity and Visual Studio's forum for professional supports.
2 People are following this question.