White Label login works a little differently than other platforms in the sense that we first have to create a White Label login session, which is then used to create a game session. When the White Label Account is logged in the SDK will save the token and use it to create a Game Session.
The LootLocker SDKs provide a single method for the complete login flow. If you for some reason need to separate the steps, that is possible as well if you follow these instructions.
// Remember to use the LootLocker namespace in the top of your file.usingLootLocker.Requests;// This code should be placed in a handler when user clicks the login button.string email ="user@lootlocker.io";string password ="password here";bool rememberMe =true;LootLockerSDKManager.WhiteLabelLoginAndStartSession(email, password, rememberMe, response =>{if (!response.success) {if (!response.LoginResponse.success) {Debug.Log("error while logging in"); } elseif (!response.SessionResponse.success) {Debug.Log("error while starting session"); }return; } // Handle Returning Player});
Congratulations - you have now started using LootLocker in your game! Next up we suggest you look at our feature set and decide which ones you want to use in your game.
Above is an example of how to implement login and starting a game session with a White Label account using blueprints in Unreal Engine. For an example you can copy and paste into your editor, look here.
Input
You need to exchange the TriggerLogin event for whatever event you want to use to trigger the flow.
Output
We recommend branching the completed events on the success flag, and if you do this you will probably want to add error handling in case the request fails as well as what (if any) continued actions you want on success.
For subsequent calls to different LootLocker methods you will want to create variables from the Player Id and Player Identifier outputs.
Since this method is behind the scenes a two step process, first login and then starting a game session, you can access the individual responses for debugging purposes using the LoginResponse and StartSessionResponse properties.
Congratulations - you have now started using LootLocker in your game! Next up we suggest you look at our feature set and decide which ones you want to use in your game.