To initialize PC SDK, fill in the values for StovePCConfig and StovePCCallback structures, and call the StovePC.Initialize method.
Enter the code piece below in the ButtonInitialize_Click method.
StovePCConfig config = new StovePCConfig
{
Env = this.Env,
AppKey = this.AppKey,
AppSecret = this.AppSecret,
GameId = this.GameId,
LogLevel = this.LogLevel,
LogPath = this.LogPath
};
this.callback = new StovePCCallback
{
OnError = new StovePCErrorDelegate(this.OnError),
OnInitializationComplete = new StovePCInitializationCompleteDelegate(this.OnInitializationComplete),
OnToken = new StovePCTokenDelegate(this.OnToken),
OnUser = new StovePCUserDelegate(this.OnUser)
};
sdkResult = StovePC.Initialize(config, callback);
Plain Text
복사
Precautions
The PCSDK log path must be set as an absolute path. ex) C:\Program Files\{Your Game Folder}\Logs Do not add "\" at the end. PCSDK automatically adds the file name "StovePCSDK.log".
If "" is set as an empty string, PCSDK automatically creates a log in the path of the game executable file folder or the folder where the PCSDK DLL is located.
YOUR_APP_KEY, YOUR_SECRET_KEY, YOUR_GAME_ID must be changed to data issued in advance.
An error occurs if you call the StovePC.Initialize function without logging into the Stove Launcher.
Write a callback when the StovePC.Initialize function call usually completes. Write the code snippet below in the OnInitializationComplete method.
sb.AppendLine("OnInitializationComplete");
sb.AppendFormat(" - nothing");
Plain Text
복사