Show / Hide Table of Contents

Interface IUnrealToolkitHookClient

An interface for tools to interact with UnrealToolkit's RPC engine hooks.

Namespace: Microsoft.XboxStudios.UnrealToolkit
Assembly: UnrealToolkit.Abstractions.dll
Syntax
public interface IUnrealToolkitHookClient

Methods

View Source

ConnectAsync(CancellationToken)

Connects the hook client if necessary.

Declaration
Task ConnectAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken

A cancellation token for the operation.

Returns
Type Description
Task

A Task representing the asynchronous operation.

View Source

ExecuteCommandAsync(string, CancellationToken)

Executes a console command in the game client.

Declaration
Task<string> ExecuteCommandAsync(string command, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string command

Command to execute (includes arguments).

CancellationToken cancellationToken

A cancellation token for the operation.

Returns
Type Description
Task<string>

Output of the command (if any).

View Source

GetActorPropertiesAsync(string?, string?, IEnumerable<string>, CancellationToken)

Retrieves property values for all actors matching the given query.

Declaration
Task<IEnumerable<(string ResultClass, string ResultName, KeyValuePair<string, object> Properties)>> GetActorPropertiesAsync(string? className, string? objectName, IEnumerable<string> properties, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string className

The class name of actors to look for.

string objectName

The name of actors to look for.

IEnumerable<string> properties

The properties to retrieve.

CancellationToken cancellationToken

A cancellation token for the operation.

Returns
Type Description
Task<IEnumerable<(string ResultClass, string ResultName, KeyValuePair<string, object> Properties)>>

A Task that contains an enumeration of each matching actor and property value.

View Source

GetObjectPropertiesAsync(string?, string?, IEnumerable<string>, CancellationToken)

Retrieves property values for all objects matching the given query.

Declaration
Task<IEnumerable<(string ResultClass, string ResultName, KeyValuePair<string, object> Properties)>> GetObjectPropertiesAsync(string? className, string? objectName, IEnumerable<string> properties, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string className

The class name of objects to look for.

string objectName

The name of objects to look for.

IEnumerable<string> properties

The properties to retrieve.

CancellationToken cancellationToken

A cancellation token for the operation.

Returns
Type Description
Task<IEnumerable<(string ResultClass, string ResultName, KeyValuePair<string, object> Properties)>>

A Task that contains an enumeration of each matching object and property value.

View Source

GetScreenshotAsync(bool, CancellationToken)

Gets a screenshot which was previously captured via TakeScreenshotAsync(bool, CancellationToken).

Declaration
Task<(int Width, int Height, byte[] Image)> GetScreenshotAsync(bool keepData = false, CancellationToken cancellationToken = default)
Parameters
Type Name Description
bool keepData

Whether or not to delete the captured data and free game memory.

CancellationToken cancellationToken

A cancellation token for the operation.

Returns
Type Description
Task<(int Width, int Height, byte[] Image)>

The screenshot width, height, and data in RGB 3 bytes-per-pixel format.

View Source

TakeAndGetScreenshotAsync(bool, bool, CancellationToken)

Takes and retrieves a screenshot of the game client viewport.

Declaration
Task<(int Width, int Height, byte[] Image)> TakeAndGetScreenshotAsync(bool showUI = false, bool keepData = false, CancellationToken cancellationToken = default)
Parameters
Type Name Description
bool showUI

Whether or not to show game UI and messages. This controls Unreal's UI and custom UI may not be affected.

bool keepData

Whether or not to delete the captured data and free game memory.

CancellationToken cancellationToken

A cancellation token for the operation.

Returns
Type Description
Task<(int Width, int Height, byte[] Image)>

The screenshot width, height, and data in RGB 3 bytes-per-pixel format.

View Source

TakeScreenshotAsync(bool, CancellationToken)

Takes a screenshot of the game client viewport.

Declaration
Task TakeScreenshotAsync(bool showUI = false, CancellationToken cancellationToken = default)
Parameters
Type Name Description
bool showUI

Whether or not to show game UI and messages. This controls Unreal's UI and custom UI may not be affected.

CancellationToken cancellationToken

A cancellation token for the operation.

Returns
Type Description
Task

A Task that completes when the screenshot has been taken.

  • View Source
In this article
Back to top Generated by DocFX