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
sceneSceneRefThe scene or group to search in, by name or by UUID.
sourceNamestringName of the source to find.
searchOffsetint?Number of matches to skip during search. >= 0 means first forward. -1 means last (top) item. Restrictions: >= -1. If omitted: 0.
canvasUuidGuid?UUID of the canvas the scene or group is in, if the scene is given by name.
cancellationTokenCancellationTokenA 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
Remarks
Scenes and Groups.