SceneGraph

A ScriptableObject that stores all scene nodes and their dependency relationships.

Definition

Namespace: Paragon.Core.SceneManagement Assembly: Paragon.dll

public class SceneGraph : ParagonScriptableObject, IEnumerable<Scene>

Inheritance: ScriptableObjectParagonScriptableObjectSceneGraph Implements: IEnumerable<Scene>

Properties

Count

The number of scenes in the graph.

public int Count { get; }

Methods

AddScene()

Adds a scene to the graph.

public void AddScene(Scene scene);
Parameter
Type
Description

scene

Scene

The scene to add

circle-exclamation

RemoveScene()

Removes a scene and cleans up dependency references.

Parameter
Type
Description

scene

Scene

The scene to remove

GetSceneNode()

Returns the node for a specific scene.

Parameter
Type
Description

scene

Scene

The scene to find

Returns: SceneNode — The node, or null if not found

GetAllScenes()

Returns all scenes in the graph.

Returns: IEnumerable<Scene> — All registered scenes

GetEnumerator()

Implements IEnumerable<Scene> for LINQ support.

Reset()

Clears all scenes from the graph.

Example

Remarks

The SceneGraph is typically configured in the Unity Editor and loaded automatically at runtime by the SceneManager. Most runtime code interacts with scenes through SceneManager rather than directly accessing the graph.

See Also

Last updated

Was this helpful?