Skip to content

Scene Graphs

Thor Brigsted edited this page Apr 6, 2020 · 1 revision
class SceneGraph : Monobehaviour

What?

Scene graphs are graphs that exist in the scene rather than as an asset. These graphs can reference scene objects, and are not shareable between scenes. Unfortunately do not work in prefabs.

How?

SceneGraph is a component, and all you have to do is add it to any GameObject. Through the component inspector, you can manage its graph.

SceneGraph lets you add any type of graph to it. If you want to create a more limited version of SceneGraph that only allows a certain type of graph, you can do so by creating a new class and inheriting from SceneGraph where T is the graph type of your choice.

public class MySceneGraph : SceneGraph<MyGraph> { }
Clone this wiki locally