Change the data folder directory (SetDefaultUserStorage)
caution
Before calling InitSDK, game developers need to set the user data cache directory and shared data cache directory.
The Player Network SDK will automatically add the game ID and application name to the path set by this interface.
If the game does not call this interface, the default path for Player Network SDK cache data is %ProgramData%\INTL\{game id}\{application name}\.For example, if the game ID is 11 and the game application name is INTLSDKDemo, then the cache data is saved at C:\ProgramData\INTL\11\INTLSDKDemo\ when this interface is not called.
Function Definition
UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static void SetDefaultUserStorageDirectory(const FString& dir);
Input Parameters
| Parameters | Type | Explanation |
|---|---|---|
| dir | FString | Directory of the user data folder |
Code example
// Example, game id is 11, and game application name is INTLSDKDemo.
// The game calls the following interface:
UINTLSDKAPI::SetDefaultUserStorageDirectory("D:\game_data\")
// Player Network SDK data cache directory is D:\game_data\11\INTLSDKDemo\.