-
-
Notifications
You must be signed in to change notification settings - Fork 593
Scene Graphs
Thor Brigsted edited this page Apr 6, 2020
·
1 revision
class SceneGraph : Monobehaviour
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.
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> { }