Re-Entering The UserLogin Scene After Backing Out Breaks IT



  • Hello, after I back out of the shop scene and go back into it it breaks my real money purchases and throws the "Payment Declined" error again. I assume this is because it doesn't log into steam the second time since that was the problem last time. I can tell without even attempting to purchase anything because whenever the shop breaks it doesn't log me in without me needing to press anything.



  • Please post the exact steps to reproduce this in the example scenes.



  • You can use the example scenes but in any of the shop scenes you need to change the close button so It directs you back to the "UserLogin" scene instead. Once this is done the Userlogin will no longer auto log you in breaking the shop.



  • The UserLogin scene reacts to the PlayfabManager.loginSucceededEvent. On the first time launching the app, the PlayfabManager tries to login the user and on success, it fires the loginSucceededEvent. The UserLogin scene will then switch to the next scene.

    Therefore, loading this scene at a later point, when the user is already logged in, the PlayfabManager.loginSucceededEvent will not fire again. Because of this, the UserLogin scene does not receive any action to load the next scene.

    The UserLogin scene can be thought of as a loading screen. There should be no incentive to load this scene when the user is already logged in. May I ask why you would want that? If you do, you could check for a value in PlayfabManager.userId and load the next scene too.

    Besides of this, the UserLogin scene does not have any further purpose and definitely does not "break the shop", since it actually doesn't have anything to do with it.



  • Because it breaks my shop and my real money purchases stop working. If it doesn't auto log, the real money purchases never work. It has to have something to due with it because what was messing up my real money purchases last time was the fact that it wasn't logging into steam through Playfab.



  • To repeat, the PlayfabManager logs into Steam on initialization, not the UserLogin scene. For Steam you actually do not need that scene at all. It's just there for convenience for the PlayfabManager+ SteamManager prefabs.



  • Then how come I have to restart the game before real money purchases work again?



  • You tell me. Avoid going back to the UserLogin scene for no reason, or please post more information about what exactly is happening. I.e. check whether the Steam connection still works e.g. by calling SteamUser.GetSteamID, and the PlayFab connection e.g. by calling GetAccountInfo (providing the PlayfabManager.userId).


Log in to reply