Table of Contents

Method GetSceneItemId

Namespace
OBSStudioClient
Assembly
OBSClient.dll

GetSceneItemId(SceneRef, string, int?, Guid?, CancellationToken)

Searches a scene for a source, and returns its id.

public Task<int> GetSceneItemId(SceneRef scene, string sourceName, int? searchOffset = null, Guid? canvasUuid = null, CancellationToken cancellationToken = default)

Parameters

scene SceneRef

The scene or group to search in, by name or by UUID.

sourceName string

Name of the source to find.

searchOffset int?

Number of matches to skip during search. >= 0 means first forward. -1 means last (top) item. Restrictions: >= -1. If omitted: 0.

canvasUuid Guid?

UUID of the canvas the scene or group is in, if the scene is given by name.

cancellationToken CancellationToken

A token that ends the wait for the response, which makes the method throw an OperationCanceledException. A request that was already sent is not undone: OBS Studio may still carry it out.

Returns

Task<int>

Numeric ID of the scene item.

Remarks

Scenes and Groups.