Minor Play Time Limit
Prerequisites
- Integrate the SDK. Required version: 1.29 or above.
- Integrate the Player Network login and authentication service.
Integration Steps
Enable Configuration
1. Contact the compliance point of contact to enable configuration for your game
"warningThreshold": 10,
"parentControlMap": {
"410": {
"5": 1,
"7": 1
}
}
warningThreshold: Advance warning time to display (unit: minutes).parentControlMap: Countries and platforms where play-time limit is enabled.
2. Enable heartbeat reporting on the client so the LI PASS SDK can automatically report heartbeats and evaluate limits
Enable with:
PARENTAL_GUIDANCE_HEARTBEAT_ENABLE = 1
PC games also need the following configuration:
INTL_SDK_PROGRESS_TYPE = 1
INTL_SDK_PROGRESS_TYPE:0for Launcher,1for game process.
3. The game server handles the callback from the SDK
Listen to SDK callbacks and handle them per the "Game-Side Handling Guidance" below.
Implementation Flow – Game Developer Steps
Unity: Business layer heartbeat callback
// Register heartbeat callback
AddParentalGuidanceResultObserver
// Unregister heartbeat callback
RemoveParentalGuidanceResultObserver
Unreal Engine: Business layer heartbeat callback
// Register heartbeat callback
AddObserver(TScriptInterface<IINTLPluginObserver> Observer)
void AddObserverExternal(TSharedPtr<IINTLPluginObserver, ESPMode::ThreadSafe> Listener)
// Unregister heartbeat callback
void RemoveObserver(UObject* Obj)
void RemoveObserverExternal(TSharedPtr<IINTLPluginObserver, ESPMode::ThreadSafe> Listener)
Callback Result
Unreal Engine
USTRUCT(BlueprintType)
struct FINTLParentalGuidanceResult : public FINTLBaseResult {
GENERATED_USTRUCT_BODY()
public:
// Time-window start, HH:MM
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "INTLSDK | INTLParentalGuidanceResult")
FString TimeLimitStart;
// Time-window end, HH:MM
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "INTLSDK | INTLParentalGuidanceResult")
FString TimeLimitEnd;
// Duration limit, in hours, integer only
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "INTLSDK | INTLParentalGuidanceResult")
int32 DurationLimit;
// Player time zone, e.g. UTC+08:00
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "INTLSDK | INTLParentalGuidanceResult")
FString TimeZone;
// Local time, HH:MM
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "INTLSDK | INTLParentalGuidanceResult")
FString Time;
// Duration online today, seconds
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "INTLSDK | INTLParentalGuidanceResult")
int32 Duration;
// Remaining play time for the current user, minutes (decimals allowed)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "INTLSDK | INTLParentalGuidanceResult")
float LeftMins;
public:
FINTLParentalGuidanceResult() {
}
FINTLParentalGuidanceResult(int ret) : FINTLBaseResult(ret) {
}
FINTLParentalGuidanceResult(FINTLBaseResult BaseRet){
MethodId = BaseRet.MethodId;
RetCode = BaseRet.RetCode;
RetMsg = BaseRet.RetMsg;
ThirdCode = BaseRet.ThirdCode;
ThirdMsg = BaseRet.ThirdMsg;
ExtraJson = BaseRet.ExtraJson;
SubRetCode = BaseRet.SubRetCode;
}
};
Unity
public class ParentalGuidanceResult : INTLBaseResult
{
private string timeLimitStart; // Time-window start, HH:MM
private string timeLimitEnd; // Time-window end, HH:MM
private long durationLimit; // Duration limit, hours (integer)
private string timeZone; // Player time zone, e.g. UTC+08:00
private string currentTime; // Local time, HH:MM
private long duration; // Duration online today, seconds
private double leftMins; // Remaining play time, minutes (decimals allowed)
[JsonProp("time_limit_start")]
public string TimeLimitStart
{
get { return timeLimitStart; }
set { timeLimitStart = value; }
}
[JsonProp("time_limit_end")]
public string TimeLimitEnd
{
get { return timeLimitEnd; }
set { timeLimitEnd = value; }
}
[JsonProp("duration_limit")]
public long DurationLimit
{
get { return durationLimit; }
set { durationLimit = value; }
}
[JsonProp("time_zone")]
public string TimeZone
{
get { return timeZone; }
set { timeZone = value; }
}
[JsonProp("time")]
public string CurrentTime
{
get { return currentTime; }
set { currentTime = value; }
}
[JsonProp("duration")]
public long Duration
{
get { return duration; }
set { duration = value; }
}
[JsonProp("left_mins")]
public double LeftMins
{
get { return leftMins; }
set { leftMins = value; }
}
public ParentalGuidanceResult() { }
public ParentalGuidanceResult(string param) : base(param) { }
public ParentalGuidanceResult(object json) : base(json) { }
}
Game-Side Handling Guidance
Handle callbacks by inspecting thirdCode / ThirdCode:
| ThirdCode | Scenario | Key Parameters | Recommended Handling |
|---|---|---|---|
70049 | Warn the player: they will reach the parent-configured daily play duration in X minutes. | duration: cumulative play time today (seconds)durationLimit: parent-configured play duration (hours)leftMins: remaining minutes (decimals allowed) | Show a dialog or text prompt. Sample copy: Your cumulative play time today will reach the limit set by your parent/guardian ( durationLimit hours) in leftMins minutes. Please wrap up key tasks to avoid an interruption. |
70047 | Kick out the player or block entry: cumulative play time today has reached the parent-configured limit. | durationLimit: parent-configured play duration (hours) | Disconnect from server / force logout with a message. Sample copy: Your cumulative play time today has reached the limit set by your parent/guardian ( durationLimit hours). Please log out and rest; try again tomorrow. |
70048 | Warn the player: the parent-configured allowed time window is ending in X minutes. | timeLimitStart: window starttimeLimitEnd: window endleftMins: remaining minutes | Show a dialog or text prompt. Sample copy: You are near the end of the healthy time window set by your parent/guardian ( timeLimitStart – timeLimitEnd, leftMins minutes left). Please wrap up key tasks to avoid an interruption. |
70046 | Kick out the player or block entry: the current time is outside the parent-configured allowed window. | timeLimitStart: window starttimeLimitEnd: window end | Disconnect from server / force logout with a message. Sample copy: The current time is outside the play window allowed by your parent/guardian ( timeLimitStart – timeLimitEnd). Please log out and rest; contact your parent/guardian for details. |
| Other values | — | — | Ignore. |