Class SceneCollection
- Namespace
- VisioForge.Core.SceneSwitching
- Assembly
- VisioForge.Core.dll
Represents a complete scene collection that can be serialized to/from JSON. This enables saving and loading entire studio configurations, similar to OBS Scene Collections.
public class SceneCollectionInheritance
Inherited Members
Properties
ActiveScene
Gets or sets the name of the active scene.
[JsonPropertyName("activeScene")]
public string ActiveScene { get; set; }Property Value
DefaultTransitionDurationMs
Gets or sets the default transition duration in milliseconds.
[JsonPropertyName("defaultTransitionDurationMs")]
public int DefaultTransitionDurationMs { get; set; }Property Value
DefaultTransitionType
Gets or sets the default transition type.
[JsonPropertyName("defaultTransitionType")]
public TransitionType DefaultTransitionType { get; set; }Property Value
Name
Gets or sets the name of this scene collection.
[JsonPropertyName("name")]
public string Name { get; set; }Property Value
Scenes
Gets or sets the list of scene definitions.
[JsonPropertyName("scenes")]
public List<SceneDefinition> Scenes { get; set; }Property Value
Sources
Gets or sets the list of source definitions.
[JsonPropertyName("sources")]
public List<SourceDefinition> Sources { get; set; }Property Value
Methods
FromJson(string)
Deserializes a scene collection from a JSON string.
public static SceneCollection FromJson(string json)Parameters
jsonstring-
The JSON string to deserialize.
Returns
- SceneCollection
-
A new VisioForge.Core.SceneSwitching.SceneCollection instance.
FromSceneManager(SceneManager, string)
Creates a SceneCollection snapshot from a running SceneManager. Note: Source definitions will contain names and types but not full configuration (since runtime input objects cannot be fully serialized).
public static SceneCollection FromSceneManager(SceneManager manager, string name)Parameters
managerSceneManager-
The scene manager to snapshot.
namestring-
The name for the collection.
Returns
- SceneCollection
-
A new VisioForge.Core.SceneSwitching.SceneCollection representing the current state.
ToJson()
Serializes this scene collection to a JSON string.
public string ToJson()Returns
- string
-
A JSON string representation of this scene collection.