VariantRoot
The root parameter of IPrefabVariantDefinition.Build — an override-only handle onto the variant's base prefab instance. There is no Add: the variant's single root IS the base prefab, never a freshly authored object.
public sealed class VariantRootCompile-time scaffolding only — SceneBuilder parses the source text to build the variant, so these methods return handles for chaining but perform no work at runtime.
Members
Overridemethod
public VariantRoot Override(Action<OverrideHandle> configure)Author property overrides on the base prefab's own root components, mirroring InstanceHandle.Override.
AddComponentmethod2 overloads
public VariantRoot AddComponent<T>()Add a component of type T to the base prefab's root with no field overrides.
public VariantRoot AddComponent<T>(Action<ComponentHandle<T>> configure)Add a component of type T to the base prefab's root and set its serialized fields in a closure.
RemoveComponentmethod
public VariantRoot RemoveComponent<T>()Remove a component of type T from the base prefab's root (must exist on the base).
Onmethod
public VariantRoot On(string childPath, Action<ScopedHandle> closure)Author overrides scoped to a nested target inside the base prefab's hierarchy, addressed by child path (e.g. "Turret/Barrel"), mirroring InstanceHandle.On.