SceneRoot
Root of a scene definition. Add top-level GameObjects here.
public sealed class SceneRootThis is compile-time scaffolding so builder files type-check and autocomplete. SceneBuilder reads the source text (via Roslyn) to build the scene — these methods are never executed.
Members
Addmethod2 overloads
public NodeHandle Add(string name)Add a root GameObject.
public NodeHandle Add(string name, Action<NodeHandle> configure)Add a root GameObject and configure it (and its children) in a closure.
Instancemethod2 overloads
public InstanceHandle Instance(string assetPath)Instantiate a root prefab instance from assetPath (a .prefab or an imported model such as a .fbx). The path is authoring-time convenience only — the GUID is authoritative and stored in the sidecar; two calls with the same path produce two distinct instances.
public InstanceHandle<TRef> Instance<TRef>(TRef prefab) where TRef : PrefabRefInstantiate a root prefab instance from a generated typed ref (e.g. Prefabs.Tank). Returns a typed handle so nested targets can be addressed via a compiler-checked selector, e.g. .On(t => t.Turret.Barrel, ...).