Table of Contents

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 SceneCollection

Inheritance

Inherited Members

Properties

ActiveScene

Gets or sets the name of the active scene.

[JsonPropertyName("activeScene")]
public string ActiveScene { get; set; }

Property Value

string

DefaultTransitionDurationMs

Gets or sets the default transition duration in milliseconds.

[JsonPropertyName("defaultTransitionDurationMs")]
public int DefaultTransitionDurationMs { get; set; }

Property Value

int

DefaultTransitionType

Gets or sets the default transition type.

[JsonPropertyName("defaultTransitionType")]
public TransitionType DefaultTransitionType { get; set; }

Property Value

TransitionType

Name

Gets or sets the name of this scene collection.

[JsonPropertyName("name")]
public string Name { get; set; }

Property Value

string

Scenes

Gets or sets the list of scene definitions.

[JsonPropertyName("scenes")]
public List<SceneDefinition> Scenes { get; set; }

Property Value

List<SceneDefinition>

Sources

Gets or sets the list of source definitions.

[JsonPropertyName("sources")]
public List<SourceDefinition> Sources { get; set; }

Property Value

List<SourceDefinition>

Methods

FromJson(string)

Deserializes a scene collection from a JSON string.

public static SceneCollection FromJson(string json)

Parameters

json string

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

manager SceneManager

The scene manager to snapshot.

name string

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.