Class SteamRemotePlay
COMPILE_TIME_ASSERT( sizeof( RemotePlayInput_t ) == 64 ); Purpose: Functions to provide information about Steam Remote Play sessions
Inherited Members
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 |
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 |
| int | pnResolutionX | Passed through to |
| int | pnResolutionY | Passed through to |
Returns
| Type | Description |
|---|---|
| bool | The value |
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 |
Returns
| Type | Description |
|---|---|
| bool | The value |
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 |
Returns
| Type | Description |
|---|---|
| bool | The value |
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 |
| int | nHeight | Passed through to |
| int | nHotX | Passed through to |
| int | nHotY | Passed through to |
| IntPtr | pBGRA | Passed through to |
| int | nPitch | Passed through to |
Returns
| Type | Description |
|---|---|
| RemotePlayCursorID_t | The value |
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 |
| uint | unMaxEvents | Passed through to |
Returns
| Type | Description |
|---|---|
| uint | The value |
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 |
Returns
| Type | Description |
|---|---|
| int | The value |
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 |
Returns
| Type | Description |
|---|---|
| int | The value |
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 |
Returns
| Type | Description |
|---|---|
| ESteamDeviceFormFactor | The value |
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 |
Returns
| Type | Description |
|---|---|
| string | The value |
GetSessionCount()
Get the number of currently connected Steam Remote Play sessions
Declaration
public static uint GetSessionCount()
Returns
| Type | Description |
|---|---|
| uint | The value |
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 |
Returns
| Type | Description |
|---|---|
| uint | The value |
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 |
Returns
| Type | Description |
|---|---|
| RemotePlaySessionID_t | The value |
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 |
Returns
| Type | Description |
|---|---|
| CSteamID | The value |
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 |
Returns
| Type | Description |
|---|---|
| int | The value |
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 |
| RemotePlayCursorID_t | unCursorID | Passed through to |
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 |
| float | flNormalizedX | Passed through to |
| float | flNormalizedY | Passed through to |
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 |
| bool | bVisible | Passed through to |
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 |