docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SteamRemotePlay

    COMPILE_TIME_ASSERT( sizeof( RemotePlayInput_t ) == 64 ); Purpose: Functions to provide information about Steam Remote Play sessions

    Inheritance
    object
    SteamRemotePlay
    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 SteamRemotePlay

    Methods

    BEnableRemotePlayTogetherDirectInput()

    Make mouse and keyboard input for Remote Play Together sessions available via GetInput() instead of being merged with local input

    Declaration
    public static bool BEnableRemotePlayTogetherDirectInput()
    Returns
    Type Description
    bool

    The value ISteamRemotePlay::BEnableRemotePlayTogetherDirectInput returns.

    BGetSessionClientResolution(RemotePlaySessionID_t, out int, out int)

    Get the resolution, in pixels, of the session client device This is set to 0x0 if the resolution is not available

    Declaration
    public static bool BGetSessionClientResolution(RemotePlaySessionID_t unSessionID, out int pnResolutionX, out int pnResolutionY)
    Parameters
    Type Name Description
    RemotePlaySessionID_t unSessionID

    Passed through to ISteamRemotePlay::BGetSessionClientResolution.

    int pnResolutionX

    Passed through to ISteamRemotePlay::BGetSessionClientResolution.

    int pnResolutionY

    Passed through to ISteamRemotePlay::BGetSessionClientResolution.

    Returns
    Type Description
    bool

    The value ISteamRemotePlay::BGetSessionClientResolution returns.

    BSendRemotePlayTogetherInvite(CSteamID)

    Invite a friend to Remote Play Together, or create a guest invite if steamIDFriend is CSteamID() This returns false if the invite can't be sent or your game is not configured for Remote Play Together

    Declaration
    public static bool BSendRemotePlayTogetherInvite(CSteamID steamIDFriend)
    Parameters
    Type Name Description
    CSteamID steamIDFriend

    Passed through to ISteamRemotePlay::BSendRemotePlayTogetherInvite.

    Returns
    Type Description
    bool

    The value ISteamRemotePlay::BSendRemotePlayTogetherInvite returns.

    BSessionRemotePlayTogether(RemotePlaySessionID_t)

    Return true if the session has joined using a Remote Play Together invitation

    Declaration
    public static bool BSessionRemotePlayTogether(RemotePlaySessionID_t unSessionID)
    Parameters
    Type Name Description
    RemotePlaySessionID_t unSessionID

    Passed through to ISteamRemotePlay::BSessionRemotePlayTogether.

    Returns
    Type Description
    bool

    The value ISteamRemotePlay::BSessionRemotePlayTogether returns.

    CreateMouseCursor(int, int, int, int, IntPtr, int)

    Create a cursor that can be used with SetMouseCursor() This is available after calling BEnableRemotePlayTogetherDirectInput() Parameters: nWidth - The width of the cursor, in pixels nHeight - The height of the cursor, in pixels nHotX - The X coordinate of the cursor hot spot in pixels, offset from the left of the cursor nHotY - The Y coordinate of the cursor hot spot in pixels, offset from the top of the cursor pBGRA - A pointer to the cursor pixels, with 8-bit color channels in red, green, blue, alpha order nPitch - The distance between pixel rows in bytes, defaults to nWidth * 4

    Declaration
    public static RemotePlayCursorID_t CreateMouseCursor(int nWidth, int nHeight, int nHotX, int nHotY, IntPtr pBGRA, int nPitch = 0)
    Parameters
    Type Name Description
    int nWidth

    Passed through to ISteamRemotePlay::CreateMouseCursor.

    int nHeight

    Passed through to ISteamRemotePlay::CreateMouseCursor.

    int nHotX

    Passed through to ISteamRemotePlay::CreateMouseCursor.

    int nHotY

    Passed through to ISteamRemotePlay::CreateMouseCursor.

    IntPtr pBGRA

    Passed through to ISteamRemotePlay::CreateMouseCursor.

    int nPitch

    Passed through to ISteamRemotePlay::CreateMouseCursor.

    Returns
    Type Description
    RemotePlayCursorID_t

    The value ISteamRemotePlay::CreateMouseCursor returns.

    DisableRemotePlayTogetherDirectInput()

    Merge Remote Play Together mouse and keyboard input with local input

    Declaration
    public static void DisableRemotePlayTogetherDirectInput()

    GetInput(RemotePlayInput_t[], uint)

    Get input events from Remote Play Together sessions This is available after calling BEnableRemotePlayTogetherDirectInput() pInput is an array of input events that will be filled in by this function, up to unMaxEvents. This returns the number of events copied to pInput, or the number of events available if pInput is nullptr.

    Declaration
    public static uint GetInput(RemotePlayInput_t[] pInput, uint unMaxEvents)
    Parameters
    Type Name Description
    RemotePlayInput_t[] pInput

    Passed through to ISteamRemotePlay::GetInput.

    uint unMaxEvents

    Passed through to ISteamRemotePlay::GetInput.

    Returns
    Type Description
    uint

    The value ISteamRemotePlay::GetInput returns.

    GetLargeSessionAvatar(RemotePlaySessionID_t)

    gets the large (184x184) avatar of the connected user, which is a handle to be used in ISteamUtils::GetImageRGBA(), or 0 if the sessionID isn't valid returns -1 if this image has yet to be loaded, in this case wait for a SteamRemotePlaySessionAvatarLoaded_t callback and then call this again

    Declaration
    public static int GetLargeSessionAvatar(RemotePlaySessionID_t unSessionID)
    Parameters
    Type Name Description
    RemotePlaySessionID_t unSessionID

    Passed through to ISteamRemotePlay::GetLargeSessionAvatar.

    Returns
    Type Description
    int

    The value ISteamRemotePlay::GetLargeSessionAvatar returns.

    GetMediumSessionAvatar(RemotePlaySessionID_t)

    gets the medium (64x64) avatar of the connected user, which is a handle to be used in ISteamUtils::GetImageRGBA(), or 0 if the sessionID isn't valid returns -1 if this image has yet to be loaded, in this case wait for a SteamRemotePlaySessionAvatarLoaded_t callback and then call this again

    Declaration
    public static int GetMediumSessionAvatar(RemotePlaySessionID_t unSessionID)
    Parameters
    Type Name Description
    RemotePlaySessionID_t unSessionID

    Passed through to ISteamRemotePlay::GetMediumSessionAvatar.

    Returns
    Type Description
    int

    The value ISteamRemotePlay::GetMediumSessionAvatar returns.

    GetSessionClientFormFactor(RemotePlaySessionID_t)

    Get the form factor of the session client device

    Declaration
    public static ESteamDeviceFormFactor GetSessionClientFormFactor(RemotePlaySessionID_t unSessionID)
    Parameters
    Type Name Description
    RemotePlaySessionID_t unSessionID

    Passed through to ISteamRemotePlay::GetSessionClientFormFactor.

    Returns
    Type Description
    ESteamDeviceFormFactor

    The value ISteamRemotePlay::GetSessionClientFormFactor returns.

    GetSessionClientName(RemotePlaySessionID_t)

    Get the name of the session client device This returns NULL if the sessionID is not valid

    Declaration
    public static string GetSessionClientName(RemotePlaySessionID_t unSessionID)
    Parameters
    Type Name Description
    RemotePlaySessionID_t unSessionID

    Passed through to ISteamRemotePlay::GetSessionClientName.

    Returns
    Type Description
    string

    The value ISteamRemotePlay::GetSessionClientName returns.

    GetSessionCount()

    Get the number of currently connected Steam Remote Play sessions

    Declaration
    public static uint GetSessionCount()
    Returns
    Type Description
    uint

    The value ISteamRemotePlay::GetSessionCount returns.

    GetSessionGuestID(RemotePlaySessionID_t)

    Get the guest ID of the connected user if they are a Remote Play Together guest This returns 0 if the sessionID isn't valid or the session isn't a Remote Play Together guest

    Declaration
    public static uint GetSessionGuestID(RemotePlaySessionID_t unSessionID)
    Parameters
    Type Name Description
    RemotePlaySessionID_t unSessionID

    Passed through to ISteamRemotePlay::GetSessionGuestID.

    Returns
    Type Description
    uint

    The value ISteamRemotePlay::GetSessionGuestID returns.

    GetSessionID(int)

    Get the currently connected Steam Remote Play session ID at the specified index. Returns zero if index is out of bounds.

    Declaration
    public static RemotePlaySessionID_t GetSessionID(int iSessionIndex)
    Parameters
    Type Name Description
    int iSessionIndex

    Passed through to ISteamRemotePlay::GetSessionID.

    Returns
    Type Description
    RemotePlaySessionID_t

    The value ISteamRemotePlay::GetSessionID returns.

    GetSessionSteamID(RemotePlaySessionID_t)

    Get the SteamID of the connected user

    Declaration
    public static CSteamID GetSessionSteamID(RemotePlaySessionID_t unSessionID)
    Parameters
    Type Name Description
    RemotePlaySessionID_t unSessionID

    Passed through to ISteamRemotePlay::GetSessionSteamID.

    Returns
    Type Description
    CSteamID

    The value ISteamRemotePlay::GetSessionSteamID returns.

    GetSmallSessionAvatar(RemotePlaySessionID_t)

    gets the small (32x32) avatar of the connected user, which is a handle to be used in ISteamUtils::GetImageRGBA(), or 0 if the sessionID isn't valid returns -1 if this image has yet to be loaded, in this case wait for a SteamRemotePlaySessionAvatarLoaded_t callback and then call this again

    Declaration
    public static int GetSmallSessionAvatar(RemotePlaySessionID_t unSessionID)
    Parameters
    Type Name Description
    RemotePlaySessionID_t unSessionID

    Passed through to ISteamRemotePlay::GetSmallSessionAvatar.

    Returns
    Type Description
    int

    The value ISteamRemotePlay::GetSmallSessionAvatar returns.

    SetMouseCursor(RemotePlaySessionID_t, RemotePlayCursorID_t)

    Set the mouse cursor for a remote player This is available after calling BEnableRemotePlayTogetherDirectInput() The cursor ID is a value returned by CreateMouseCursor()

    Declaration
    public static void SetMouseCursor(RemotePlaySessionID_t unSessionID, RemotePlayCursorID_t unCursorID)
    Parameters
    Type Name Description
    RemotePlaySessionID_t unSessionID

    Passed through to ISteamRemotePlay::SetMouseCursor.

    RemotePlayCursorID_t unCursorID

    Passed through to ISteamRemotePlay::SetMouseCursor.

    SetMousePosition(RemotePlaySessionID_t, float, float)

    Set the mouse cursor position for a remote player This is available after calling BEnableRemotePlayTogetherDirectInput() This is used to warp the cursor to a specific location and isn't needed during normal event processing. The position is normalized relative to the window, where 0,0 is the upper left, and 1,1 is the lower right.

    Declaration
    public static void SetMousePosition(RemotePlaySessionID_t unSessionID, float flNormalizedX, float flNormalizedY)
    Parameters
    Type Name Description
    RemotePlaySessionID_t unSessionID

    Passed through to ISteamRemotePlay::SetMousePosition.

    float flNormalizedX

    Passed through to ISteamRemotePlay::SetMousePosition.

    float flNormalizedY

    Passed through to ISteamRemotePlay::SetMousePosition.

    SetMouseVisibility(RemotePlaySessionID_t, bool)

    Set the mouse cursor visibility for a remote player This is available after calling BEnableRemotePlayTogetherDirectInput()

    Declaration
    public static void SetMouseVisibility(RemotePlaySessionID_t unSessionID, bool bVisible)
    Parameters
    Type Name Description
    RemotePlaySessionID_t unSessionID

    Passed through to ISteamRemotePlay::SetMouseVisibility.

    bool bVisible

    Passed through to ISteamRemotePlay::SetMouseVisibility.

    ShowRemotePlayTogetherUI()

    Show the Remote Play Together UI in the game overlay This returns false if your game is not configured for Remote Play Together

    Declaration
    public static bool ShowRemotePlayTogetherUI()
    Returns
    Type Description
    bool

    The value ISteamRemotePlay::ShowRemotePlayTogetherUI returns.

    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)