Console
- Player Network SDK 1.24 及之后版本
- Player Network SDK 1.24 之前的版本
Unity 2021.3.33f1 ~ Unity 2022
Unity 2018 ~ Unity 2022
警告
由于主机游戏多半使用 Windows 来进行开发,游戏的安装目录不能含有英文字符分号(;),否则会导致游戏无法找到必要的 DLL,导致游戏运行失败。
版本需求
对于 Nintendo Switch 平台,Switch Nintendo SDK >= 18.3.1
对于 PlayStation 5 平台,PS5 SDK >= 9.00.00
对于 Xbox Series X|S 平台,GDK version >= 231003
前提条件
警告
游戏使用的每个 SDK 插件的版本(包括游戏启动器使用的版本)必须保持一致。如果游戏需要同时访问多个版本的 Player Network SDK,或者只有一个组件需要升级,请联系 Player Network 助手。
步骤1:安装 SDK
1. 将 Player Network SDK 添加到您的项目
- 解压 SDK 软件包。
- 将
INTLSDK
文件夹复制到项 目的Assets
文件夹中。 - 将 Player Network SDK 的
Plugins
文件夹合并到项目的Plugins
文件夹中。
Player Network SDK package
├─INTLSDK // Player Network SDK CS scripts which provide APIs and callbacks
│ ├─Editor // Player Network SDK Editor scripts which include Player Network SDK XUPorter
│ └─Scripts // Player Network SDK scripts which include INTLCore and other plugin scripts
├─LevelInfinite // LI PASS APIs
├─Plugins // Player Network SDK plugins for various platforms
│ ├─Android
│ ├─iOS
│ ├─MacOS
│ └─Windows~
├─Symbols // Player Network SDK symbol table *.so files
└─UnionAdapter // UnionAdpater APIs which adapts to both MSDK and Player Network SDK
INTLSDK/Scripts/INTLCore
├─INTLSDK
│ ├─Editor
│ └─Scripts
│ ├─INTLConfig
| └─INTLCore
| ├─Editor // INTLCore PostProcess.cs / PreProcess.cs files for different platforms
| | ├─INTLCoreAndroidPostProcess.cs
| | ├─INTLCoreiOSPostProcess.cs
| | ├─INTLCoreMacOSPostProcess.cs
| | ├─INTLCoreWindowsPostProcess.cs
| | └─INTLCoreWindowsPreProcess.cs
| └─Scripts // INTLCore scripts
| ├─INTLAPI.cs // Player Network SDK APIs
| ├─INTLConfig.cs // Player Network SDK data structures
| ├─INTLDefine.cs // Player Network SDK static strings
| ├─INTLErrorCode.cs // Player Network SDK error codes
| ├─Modules
| └─Utils
├─LevelInfinite
├─Plugins
├─Symbols
└─UnionAdapter
INTLSDK/Script/INTLConfig
├─INTLSDK
│ ├─Editor
│ └─Scripts
│ ├─INTLConfig
| | └─Editor // Player Network SDK configuration files, PostProcess.cs files, and encryption tools
| | ├─Encrypt
| | | ├─decrypt // Player Network SDK decryption tool for INTLConfig.ini
| | | ├─Decrypt.exe // Player Network SDK decryption tool for INTLConfig.ini
| | | ├─encrypt // Player Network SDK encryption tool for INTLConfig.ini
| | | ├─Encrypt.exe // Player Network SDK encryption tool for INTLConfig.ini
| | | ├─EncryptConfig.ini // Player Network SDK file to enable or disable INTLConfig.ini encryption
| | | ├─INTLConfigINI.cs
| | | ├─INTLConfigINIEditor.cs
| | | └─INTLEditorTools.cs
| | ├─INTLConfigAndroidPostProcess.cs
| | ├─INTLConfigiOSPostProcess.cs
| | ├─INTLConfigMacOSPostProcess.cs
| | ├─INTLConfigSwitchPreProcess.cs
| | ├─INTLConfigWind...sPostProcess.cs
| | └─Resources // Player Network SDK configurations
| | ├─APASConfig.ini // APAS device level configuration file
| | └─INTLConfig.ini // Player Network SDK main configuration file
| └─INTLCore
├─LevelInfinite
└─Plugins
2. Player Network SDK 配置
注意
手动修改 INTLConfig.ini
配置时,请联系 Player Network 助手确认内容变更是否符合预期,详见 SDK Config 须知。
请按照 INTLConfig.ini 的说明进行相应配置。
3. 初始化 Player Network SDK
在集成第三方渠道之前,必须先初始化 Player Network SDK。更多详情,请参见 初始化 SDK。
using INTL;// import INTL namespace
void InitializeINTLSDK()
{
INTLAPI.IsDebug = true; // 设置 SDK 为 Debug 模式打印出日志,默认为 false
INTLAPI.InitSDK();
}