Table of Contents

Method CreateSceneItem

Namespace
OBSStudioClient
Assembly
OBSClient.dll

CreateSceneItem(SceneRef, SourceRef, bool?, Guid?, CancellationToken)

Creates a new scene item using a source.

public Task<int> CreateSceneItem(SceneRef scene, SourceRef source, bool? sceneItemEnabled = null, Guid? canvasUuid = null, CancellationToken cancellationToken = default)

Parameters

scene SceneRef

The scene to create the new item in, by name or by UUID.

source SourceRef

The source to add to the scene, by name or by UUID.

sceneItemEnabled bool?

Enable state to apply to the scene item on creation. If omitted: True.

canvasUuid Guid?

UUID of the canvas the scene 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 only.