Class ObsNameInUseException
- Namespace
- OBSStudioClient.Exceptions
- Assembly
- OBSClient.dll
Represents an exception that is thrown when OBS Studio refuses to give a scene, an input, a profile or a scene collection a name because the name is taken (the status 601 of obs-websocket).
[Serializable]
public class ObsNameInUseException : ObsResponseException, ISerializable
- Inheritance
-
ObsNameInUseException
- Implements
- Inherited Members
Remarks
Nothing was changed. The message says what holds the name, as far as the model knows: a scene, a group (a group holds its name like any source), an input, or an input that was
removed and that OBS Studio keeps alive (Detached) because scene items still show it. The name of such an input stays taken until its last scene
item is gone, so creating or renaming something to that name fails until the input is removed for good: HeldBy is the object to call RemoveAsync on (unless a scene
item inside a group shows it: RemoveAsync refuses that, and it has to be taken out of the group in OBS Studio first). With OBS Studio 31.0 and older a scene that was removed and is
alive holds its name in the same way, and so does a group (a group is destroyed with the scene item that shows it, and RemoveAsync refuses a group: call it on that scene item);
OBS Studio 31.1 and newer free the name of a scene at once.
The names of scenes and inputs are not alike. An input can not have the name of a scene or of another input (also not of an input that was removed and is alive). A scene can not have the name of another scene, and whether it can have the name of an input depends on the version of OBS Studio: obs-websocket 5.7 and newer allows it, and obs-websocket 5.6 and older refuse the name of any source (the message says so when that is what happened). The names are case sensitive.
Constructors
- ObsNameInUseException(string, string, ObsSource?)
Initializes a new instance of the ObsNameInUseException class.
Properties
- HeldBy
Gets the object that holds the name, as far as the model knows: a scene, a group, an input, or an input that was removed and that OBS Studio keeps alive. It is null when the model does not show what holds the name (it can be behind OBS Studio by a few milliseconds).
- Name
Gets the name that OBS Studio refused.