We have made authenticating with Nintendo Switch as simple as possible with this integration.
Ensure that you have the following conditions met:
- You are registered with Nintendo as a developer (otherwise you will not have access to their developer tools)
- Install the NintendoSDK from the environment, as well as all dependencies
- You have enabled the Nintendo Switch platform in your games settings in LootLocker, and the Nintendo Application ID matches in Unity and the LootLocker console (You can use the Nintendo default one during initial development)
We'll start by creating a new empty Game Object in your scene and calling it GameManager. Feel free to skip this if you already have a GameManager or similar in your game.
Then in this new GameObject you can add a new script called GameManager
Open up your new script in your editor of choice and add the following code.
public class GameManager : MonoBehaviour
string NSAIDToken = getNSAIDToken();
LootLockerSDKManager.StartNintendoSwitchSession(NSAIDToken, (response) =>
Debug.Log("error starting LootLocker session");
Debug.Log("successfully started LootLocker session");
To confirm that everything is running without errors, you can start your game and check the console for the correct Debug.Log message.