Table of Contents

Method SetEnabledInAllScenesAsync

Namespace
OBSStudioClient.Model
Assembly
OBSClient.dll

SetEnabledInAllScenesAsync(bool, CancellationToken)

Shows or hides the input in every scene that shows it, and returns when the model shows it.

public Task SetEnabledInAllScenesAsync(bool value, CancellationToken cancellationToken = default)

Parameters

value bool

True to show the scene items of the input, false to hide them.

cancellationToken CancellationToken

A token that ends the wait. A change that was not sent yet is not sent.

Returns

Task

A task that completes when IsEnabled is value for each scene item that was showing the input.

Remarks

OBS Studio has no request for this: the call changes each scene item that shows the input, in one batch that stops at its first refusal (the scene items before it were changed). The scene items are the ones that the model shows when the change has its turn, in scenes that are not removed (see GetSceneItems(); a scene that the model took for removed only because a list of scenes did not have it, while no event of OBS Studio removed it, counts as not removed: OBS Studio makes that list from its user interface, which can be busy for seconds, and can still have the scene); an input that no scene item shows has nothing to change, and the call returns when it has its turn. An input that the user removes meanwhile stays alive for its scene items, and the call returns when the model shows the change of those. See SetEnabledAsync(bool, CancellationToken) for the order of changes and the wait.

Exceptions

ObsRemovedException

The input was removed, or OBS Studio refused one of its scene items because it was removed meanwhile.

ObsNotConnectedException

There is no connection to OBS Studio. Nothing was changed.

ObsNotReadyException

OBS Studio is changing its scene collection, or did so after the call. Nothing was changed.

ObsUnknownOutcomeException

OBS Studio did not answer in time, or the connection ended: it is not known whether it made the change.

ObsNotConfirmedException

OBS Studio made the change, and the model does not show it. Do not send the change again.

ObsResponseException

OBS Studio refused the change.