docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct DurationControl_t

    Purpose: sent for games with enabled anti indulgence / duration control, for enabled users. Lets the game know whether the user can keep playing or whether the game should exit, and returns info about remaining gameplay time. This callback is fired asynchronously in response to timers triggering. It is also fired in response to calls to GetDurationControl().

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Steamworks.Interop
    Assembly: Unity.Steamworks.Interop.dll
    Syntax
    [Serializable]
    [CallbackIdentity(167)]
    public struct DurationControl_t

    Fields

    k_iCallback

    The identifier Steam dispatches this callback under.

    Declaration
    public const int k_iCallback = 167
    Field Value
    Type Description
    int

    m_appid

    appid generating playtime

    Declaration
    public AppId_t m_appid
    Field Value
    Type Description
    AppId_t

    m_bApplicable

    is duration control applicable to user + game combination

    Declaration
    public bool m_bApplicable
    Field Value
    Type Description
    bool

    m_csecsLast5h

    playtime since most recent 5 hour gap in playtime, only counting up to regulatory limit of playtime, in seconds

    Declaration
    public int m_csecsLast5h
    Field Value
    Type Description
    int

    m_csecsRemaining

    playtime remaining until the user hits a regulatory limit

    Declaration
    public int m_csecsRemaining
    Field Value
    Type Description
    int

    m_csecsToday

    playtime on current calendar day

    Declaration
    public int m_csecsToday
    Field Value
    Type Description
    int

    m_eResult

    result of call (always k_EResultOK for asynchronous timer-based notifications)

    Declaration
    public EResult m_eResult
    Field Value
    Type Description
    EResult

    m_notification

    notification to show, if any (always k_EDurationControlNotification_None for API calls)

    Declaration
    public EDurationControlNotification m_notification
    Field Value
    Type Description
    EDurationControlNotification

    m_progress

    recommended progress (either everything is fine, or please exit game)

    Declaration
    public EDurationControlProgress m_progress
    Field Value
    Type Description
    EDurationControlProgress
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)