Switch
本文旨在介绍如何设置 Nintendo Switch 身份验证,让您的游戏可以使用 Player Network 登录鉴权服务通过 Nintendo Switch 渠道登录。
前提条件
1. Register for an account and create a channel
- Create an account for Player Network Console.
- Create a new project for your game, or join an existing one.
- Download the SDK.
- Integrate the SDK.
- Add Nintendo as an authentication method for your project on Player Network Console.
步骤1:Complete Player Network SDK Configurations
- Unity
- Unreal Engine
Version requirements:
Nintendo SDK 9.41
Unity 2019.3.13f1
Through the non-editable SwitchPreProcess.cs
script, INTLSDK copies the configuration files INTLConfig.ini and INTLResultMsg.json
to the StreamingAssets
folder, then packages them together into the NSP file, which can then be read by INTLSDK.
The NSP file structure is as follows:
Version requirements:
Unreal Engine 4.26 non-public version
Switch games enable players to select their account by default when the game starts. As Unreal Engine retrieves player account by default, INTLSDK may crash due to repeated retrieving player account. Therefore, games need to update the Unreal Engine source code.
Delete the code to automatically obtain player account when game starts in the FSwitchPlatformMisc::GetUidForControllerId(int32 ControllerId, struct nn::account::Uid& Uid)
function from SwitchPlatformMisc.cpp
Through the INTLPlugin.Build.cs
script, INTLSDK creates a new INTLSDK folder in the NSP package, and copies the configuration files INTLConfig.ini and INTLResultMsg.json
to the new INTLSDK folder, which can then be read by INTLSDK.
The NSP file structure is as follows: