SetDefaultUserStorage
Windows
If you were looking for the method for use with Unity, see SetDefaultUserStorage for Unity SDK.
If you were looking for the method for use with Unity, see SetDefaultUserStorage for Unity SDK.
caution
Before calling InitSDK
, game developers must set the UserData cache directory and SharedData cache directory.
Player Network SDK will automatically append game ID and application name to the path set by this interface.
If this interface is not invoked by game, then the default path for the Player Network SDK cache data will be %ProgramData%\INTL\{game id}\{application name}\
. For example, game id is 11, and the game application name is INTLSDKDemo, and this interface is not invoked. Then Player Network SDK data will be saved to C:\ProgramData\INTL\11\INTLSDKDemo\
.
Function definition
UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static void SetDefaultUserStorageDirectory(const FString& dir);
Input parameters
Parameter | Type | Description |
---|---|---|
dir | FString | Directory of user data folder |
Code sample
// For example, game id is 11, and the game application name is INTLSDKDemo.
// Then the game invoke the interface like this:
UINTLSDKAPI::SetDefaultUserStorageDirectory("D:\\game_data\\")
// The data cache path for Player Network SDK will be D:\game_data\11\INTLSDKDemo\.