docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SteamApps

    Purpose: interface to app data

    Inheritance
    object
    SteamApps
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Steamworks.Interop
    Assembly: Unity.Steamworks.Interop.dll
    Syntax
    public static class SteamApps

    Methods

    BGetDLCDataByIndex(int, out AppId_t, out bool, out string, int)

    Returns metadata for DLC by index, of range [0, GetDLCCount()]

    Declaration
    public static bool BGetDLCDataByIndex(int iDLC, out AppId_t pAppID, out bool pbAvailable, out string pchName, int cchNameBufferSize)
    Parameters
    Type Name Description
    int iDLC

    Passed through to ISteamApps::BGetDLCDataByIndex.

    AppId_t pAppID

    Passed through to ISteamApps::BGetDLCDataByIndex.

    bool pbAvailable

    Passed through to ISteamApps::BGetDLCDataByIndex.

    string pchName

    Receives the string ISteamApps::BGetDLCDataByIndex writes.

    int cchNameBufferSize

    Passed through to ISteamApps::BGetDLCDataByIndex.

    Returns
    Type Description
    bool

    The value ISteamApps::BGetDLCDataByIndex returns.

    BIsAppInstalled(AppId_t)

    returns true if that app is installed (not necessarily owned)

    Declaration
    public static bool BIsAppInstalled(AppId_t appID)
    Parameters
    Type Name Description
    AppId_t appID

    Passed through to ISteamApps::BIsAppInstalled.

    Returns
    Type Description
    bool

    The value ISteamApps::BIsAppInstalled returns.

    BIsCybercafe()

    Calls the Steamworks ISteamApps::BIsCybercafe method.

    Declaration
    public static bool BIsCybercafe()
    Returns
    Type Description
    bool

    The value ISteamApps::BIsCybercafe returns.

    BIsDlcInstalled(AppId_t)

    Takes AppID of DLC and checks if the user owns the DLC & if the DLC is installed

    Declaration
    public static bool BIsDlcInstalled(AppId_t appID)
    Parameters
    Type Name Description
    AppId_t appID

    Passed through to ISteamApps::BIsDlcInstalled.

    Returns
    Type Description
    bool

    The value ISteamApps::BIsDlcInstalled returns.

    BIsLowViolence()

    Calls the Steamworks ISteamApps::BIsLowViolence method.

    Declaration
    public static bool BIsLowViolence()
    Returns
    Type Description
    bool

    The value ISteamApps::BIsLowViolence returns.

    BIsSubscribed()

    Calls the Steamworks ISteamApps::BIsSubscribed method.

    Declaration
    public static bool BIsSubscribed()
    Returns
    Type Description
    bool

    The value ISteamApps::BIsSubscribed returns.

    BIsSubscribedApp(AppId_t)

    only use this member if you need to check ownership of another game related to yours, a demo for example

    Declaration
    public static bool BIsSubscribedApp(AppId_t appID)
    Parameters
    Type Name Description
    AppId_t appID

    Passed through to ISteamApps::BIsSubscribedApp.

    Returns
    Type Description
    bool

    The value ISteamApps::BIsSubscribedApp returns.

    BIsSubscribedFromFamilySharing()

    Check if user borrowed this game via Family Sharing, If true, call GetAppOwner() to get the lender SteamID

    Declaration
    public static bool BIsSubscribedFromFamilySharing()
    Returns
    Type Description
    bool

    The value ISteamApps::BIsSubscribedFromFamilySharing returns.

    BIsSubscribedFromFreeWeekend()

    Checks if the user is subscribed to the current app through a free weekend This function will return false for users who have a retail or other type of license Before using, please ask your Valve technical contact how to package and secure your free weekend

    Declaration
    public static bool BIsSubscribedFromFreeWeekend()
    Returns
    Type Description
    bool

    The value ISteamApps::BIsSubscribedFromFreeWeekend returns.

    BIsTimedTrial(out uint, out uint)

    check if game is a timed trial with limited playtime

    Declaration
    public static bool BIsTimedTrial(out uint punSecondsAllowed, out uint punSecondsPlayed)
    Parameters
    Type Name Description
    uint punSecondsAllowed

    Passed through to ISteamApps::BIsTimedTrial.

    uint punSecondsPlayed

    Passed through to ISteamApps::BIsTimedTrial.

    Returns
    Type Description
    bool

    The value ISteamApps::BIsTimedTrial returns.

    BIsVACBanned()

    Calls the Steamworks ISteamApps::BIsVACBanned method.

    Declaration
    public static bool BIsVACBanned()
    Returns
    Type Description
    bool

    The value ISteamApps::BIsVACBanned returns.

    GetAppBuildId()

    return the buildid of this app, may change at any time based on backend updates to the game

    Declaration
    public static int GetAppBuildId()
    Returns
    Type Description
    int

    The value ISteamApps::GetAppBuildId returns.

    GetAppInstallDir(AppId_t, out string, uint)

    returns current app install folder for AppID, returns folder name length

    Declaration
    public static uint GetAppInstallDir(AppId_t appID, out string pchFolder, uint cchFolderBufferSize)
    Parameters
    Type Name Description
    AppId_t appID

    Passed through to ISteamApps::GetAppInstallDir.

    string pchFolder

    Receives the string ISteamApps::GetAppInstallDir writes.

    uint cchFolderBufferSize

    Passed through to ISteamApps::GetAppInstallDir.

    Returns
    Type Description
    uint

    The value ISteamApps::GetAppInstallDir returns.

    GetAppOwner()

    returns the SteamID of the original owner. If this CSteamID is different from ISteamUser::GetSteamID(), the user has a temporary license borrowed via Family Sharing

    Declaration
    public static CSteamID GetAppOwner()
    Returns
    Type Description
    CSteamID

    The value ISteamApps::GetAppOwner returns.

    GetAvailableGameLanguages()

    Calls the Steamworks ISteamApps::GetAvailableGameLanguages method.

    Declaration
    public static string GetAvailableGameLanguages()
    Returns
    Type Description
    string

    The value ISteamApps::GetAvailableGameLanguages returns.

    GetBetaInfo(int, out uint, out uint, out string, int, out string, int, out uint)

    return beta branch details, name, description, current BuildID and state flags (EBetaBranchFlags) iterate through

    Declaration
    public static bool GetBetaInfo(int iBetaIndex, out uint punFlags, out uint punBuildID, out string pchBetaName, int cchBetaName, out string pchDescription, int cchDescription, out uint punLastUpdated)
    Parameters
    Type Name Description
    int iBetaIndex

    Passed through to ISteamApps::GetBetaInfo.

    uint punFlags

    Passed through to ISteamApps::GetBetaInfo.

    uint punBuildID

    Passed through to ISteamApps::GetBetaInfo.

    string pchBetaName

    Receives the string ISteamApps::GetBetaInfo writes.

    int cchBetaName

    Passed through to ISteamApps::GetBetaInfo.

    string pchDescription

    Receives the string ISteamApps::GetBetaInfo writes.

    int cchDescription

    Passed through to ISteamApps::GetBetaInfo.

    uint punLastUpdated

    Passed through to ISteamApps::GetBetaInfo.

    Returns
    Type Description
    bool

    The value ISteamApps::GetBetaInfo returns.

    GetCurrentBetaName(out string, int)

    returns current beta branch name, 'public' is the default branch

    Declaration
    public static bool GetCurrentBetaName(out string pchName, int cchNameBufferSize)
    Parameters
    Type Name Description
    string pchName

    Receives the string ISteamApps::GetCurrentBetaName writes.

    int cchNameBufferSize

    Passed through to ISteamApps::GetCurrentBetaName.

    Returns
    Type Description
    bool

    The value ISteamApps::GetCurrentBetaName returns.

    GetCurrentGameLanguage()

    Calls the Steamworks ISteamApps::GetCurrentGameLanguage method.

    Declaration
    public static string GetCurrentGameLanguage()
    Returns
    Type Description
    string

    The value ISteamApps::GetCurrentGameLanguage returns.

    GetDLCCount()

    Returns the number of DLC pieces for the running app

    Declaration
    public static int GetDLCCount()
    Returns
    Type Description
    int

    The value ISteamApps::GetDLCCount returns.

    GetDlcDownloadProgress(AppId_t, out ulong, out ulong)

    get download progress for optional DLC

    Declaration
    public static bool GetDlcDownloadProgress(AppId_t nAppID, out ulong punBytesDownloaded, out ulong punBytesTotal)
    Parameters
    Type Name Description
    AppId_t nAppID

    Passed through to ISteamApps::GetDlcDownloadProgress.

    ulong punBytesDownloaded

    Passed through to ISteamApps::GetDlcDownloadProgress.

    ulong punBytesTotal

    Passed through to ISteamApps::GetDlcDownloadProgress.

    Returns
    Type Description
    bool

    The value ISteamApps::GetDlcDownloadProgress returns.

    GetEarliestPurchaseUnixTime(AppId_t)

    returns the Unix time of the purchase of the app

    Declaration
    public static uint GetEarliestPurchaseUnixTime(AppId_t nAppID)
    Parameters
    Type Name Description
    AppId_t nAppID

    Passed through to ISteamApps::GetEarliestPurchaseUnixTime.

    Returns
    Type Description
    uint

    The value ISteamApps::GetEarliestPurchaseUnixTime returns.

    GetFileDetails(string)

    Calls the Steamworks ISteamApps::GetFileDetails method.

    Declaration
    public static SteamAPICall_t GetFileDetails(string pszFileName)
    Parameters
    Type Name Description
    string pszFileName

    Passed through to ISteamApps::GetFileDetails.

    Returns
    Type Description
    SteamAPICall_t

    The value ISteamApps::GetFileDetails returns.

    GetFileDetailsAsync(string)

    Async version of GetFileDetails(string).

    Declaration
    public static Task<FileDetailsResult_t> GetFileDetailsAsync(string pszFileName)
    Parameters
    Type Name Description
    string pszFileName

    Passed through to ISteamApps::GetFileDetails.

    Returns
    Type Description
    Task<FileDetailsResult_t>

    The FileDetailsResult_t Steam reports once the call completes.

    GetInstalledDepots(AppId_t, DepotId_t[], uint)

    return installed depots in mount order

    Declaration
    public static uint GetInstalledDepots(AppId_t appID, DepotId_t[] pvecDepots, uint cMaxDepots)
    Parameters
    Type Name Description
    AppId_t appID

    Passed through to ISteamApps::GetInstalledDepots.

    DepotId_t[] pvecDepots

    Passed through to ISteamApps::GetInstalledDepots.

    uint cMaxDepots

    Passed through to ISteamApps::GetInstalledDepots.

    Returns
    Type Description
    uint

    The value ISteamApps::GetInstalledDepots returns.

    GetLaunchCommandLine(out string, int)

    Get command line if game was launched via Steam URL, e.g. steam://run/<appid>//<command line>/. This method of passing a connect string (used when joining via rich presence, accepting an invite, etc) is preferable to passing the connect string on the operating system command line, which is a security risk. In order for rich presence joins to go through this path and not be placed on the OS command line, you must set a value in your app's configuration on Steam. Ask Valve for help with this. If game was already running and launched again, the NewUrlLaunchParameters_t will be fired.

    Declaration
    public static int GetLaunchCommandLine(out string pszCommandLine, int cubCommandLine)
    Parameters
    Type Name Description
    string pszCommandLine

    Receives the string ISteamApps::GetLaunchCommandLine writes.

    int cubCommandLine

    Passed through to ISteamApps::GetLaunchCommandLine.

    Returns
    Type Description
    int

    The value ISteamApps::GetLaunchCommandLine returns.

    GetLaunchQueryParam(string)

    Returns the associated launch param if the game is run via steam://run/<appid>//?param1=value1&param2=value2&param3=value3 etc. Parameter names starting with the character '@' are reserved for internal use and will always return and empty string. Parameter names starting with an underscore '_' are reserved for steam features -- they can be queried by the game, but it is advised that you not param names beginning with an underscore for your own features. Check for new launch parameters on callback NewUrlLaunchParameters_t

    Declaration
    public static string GetLaunchQueryParam(string pchKey)
    Parameters
    Type Name Description
    string pchKey

    Passed through to ISteamApps::GetLaunchQueryParam.

    Returns
    Type Description
    string

    The value ISteamApps::GetLaunchQueryParam returns.

    GetNumBetas(out int, out int)

    returns total number of known app branches (including default "public" branch ). nAvailable is number of available betas

    Declaration
    public static int GetNumBetas(out int pnAvailable, out int pnPrivate)
    Parameters
    Type Name Description
    int pnAvailable

    Passed through to ISteamApps::GetNumBetas.

    int pnPrivate

    Passed through to ISteamApps::GetNumBetas.

    Returns
    Type Description
    int

    The value ISteamApps::GetNumBetas returns.

    InstallDLC(AppId_t)

    Install/Uninstall control for optional DLC

    Declaration
    public static void InstallDLC(AppId_t nAppID)
    Parameters
    Type Name Description
    AppId_t nAppID

    Passed through to ISteamApps::InstallDLC.

    MarkContentCorrupt(bool)

    signal Steam that game files seems corrupt or missing

    Declaration
    public static bool MarkContentCorrupt(bool bMissingFilesOnly)
    Parameters
    Type Name Description
    bool bMissingFilesOnly

    Passed through to ISteamApps::MarkContentCorrupt.

    Returns
    Type Description
    bool

    The value ISteamApps::MarkContentCorrupt returns.

    RequestAllProofOfPurchaseKeys()

    Request all proof of purchase keys for the calling appid and associated DLC. A series of AppProofOfPurchaseKeyResponse_t callbacks will be sent with appropriate appid values, ending with a final callback where the m_nAppId member is k_uAppIdInvalid (zero).

    Declaration
    public static void RequestAllProofOfPurchaseKeys()

    RequestAppProofOfPurchaseKey(AppId_t)

    Request legacy cd-key for yourself or owned DLC. If you are interested in this data then make sure you provide us with a list of valid keys to be distributed to users when they purchase the game, before the game ships. You'll receive an AppProofOfPurchaseKeyResponse_t callback when the key is available (which may be immediately).

    Declaration
    public static void RequestAppProofOfPurchaseKey(AppId_t nAppID)
    Parameters
    Type Name Description
    AppId_t nAppID

    Passed through to ISteamApps::RequestAppProofOfPurchaseKey.

    SetActiveBeta(string)

    select this beta branch for this app as active, might need the game to restart so Steam can update to that branch

    Declaration
    public static bool SetActiveBeta(string pchBetaName)
    Parameters
    Type Name Description
    string pchBetaName

    Passed through to ISteamApps::SetActiveBeta.

    Returns
    Type Description
    bool

    The value ISteamApps::SetActiveBeta returns.

    SetDlcContext(AppId_t)

    set current DLC AppID being played (or 0 if none). Allows Steam to track usage of major DLC extensions

    Declaration
    public static bool SetDlcContext(AppId_t nAppID)
    Parameters
    Type Name Description
    AppId_t nAppID

    Passed through to ISteamApps::SetDlcContext.

    Returns
    Type Description
    bool

    The value ISteamApps::SetDlcContext returns.

    SetGamePerformanceSetting(EGamePerformanceSetting)

    game performance settings

    Declaration
    public static void SetGamePerformanceSetting(EGamePerformanceSetting setting)
    Parameters
    Type Name Description
    EGamePerformanceSetting setting

    Passed through to ISteamApps::SetGamePerformanceSetting.

    SetGameRenderResolution(uint, uint)

    Calls the Steamworks ISteamApps::SetGameRenderResolution method.

    Declaration
    public static void SetGameRenderResolution(uint unWidth, uint unHeight)
    Parameters
    Type Name Description
    uint unWidth

    Passed through to ISteamApps::SetGameRenderResolution.

    uint unHeight

    Passed through to ISteamApps::SetGameRenderResolution.

    UninstallDLC(AppId_t)

    Calls the Steamworks ISteamApps::UninstallDLC method.

    Declaration
    public static void UninstallDLC(AppId_t nAppID)
    Parameters
    Type Name Description
    AppId_t nAppID

    Passed through to ISteamApps::UninstallDLC.

    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)