SceneNode

Represents a scene within a SceneGraph and manages its dependencies.

Definition

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

[Serializable]
public class SceneNode

Properties

Scene

The scene this node represents.

public Scene Scene { get; }

Constructors

SceneNode(SceneGraph, Scene)

Creates a new scene node.

public SceneNode(SceneGraph graph, Scene scene);
Parameter
Type
Description

graph

SceneGraph

The parent graph

scene

Scene

The scene this node represents

Methods

AddDependency()

Adds a scene as a dependency.

Parameter
Type
Description

scene

Scene

The dependency to add

circle-exclamation

RemoveDependency()

Removes a dependency from this node.

Parameter
Type
Description

node

SceneNode

The dependency node to remove

HasDependency()

Checks if a scene is a direct dependency.

Parameter
Type
Description

scene

Scene

The scene to check

Returns: booltrue if it's a dependency

GetDependencies()

Returns all direct dependencies of this node.

Returns: IEnumerable<Scene> — The dependency scenes

ToString()

Returns the scene name.

Returns: string — The scene name

Remarks

Dependencies are resolved recursively by SceneManager when loading scenes. If scene A depends on scene B, and B depends on C, loading A with loadDependencies = true will load C first, then B, then A.

See Also

Last updated

Was this helpful?