OverrideHandle
A handle for authoring property overrides on a prefab instance's root, via InstanceHandle.Override. Unlike ComponentHandle<T>, a single closure can target multiple different root component types — TComponent is inferred per-call from the selector's explicitly-typed lambda parameter, e.g. e.Set((Health x) => x.health, 50).
public sealed class OverrideHandleCompile-time scaffolding only — SceneBuilder parses the source text to build the scene, so these methods return handles for chaining but perform no work at runtime.
Members
Setmethod4 overloads
public OverrideHandle Set<TComponent, TValue>(Func<TComponent, TValue> selector, TValue value)Set a field by typed member selector (e.g. (Health x) => x.health).
public OverrideHandle Set<TComponent, TValue>(Func<TComponent, TValue> selector, AssetReference asset)Set an asset-reference field by typed member selector, e.g. e.Set((MeshRenderer m) => m.sharedMaterial, Asset("Assets/Materials/Red.mat")). The selector's return type is the asset type; the value is the AssetReference factory result.
public OverrideHandle Set<TComponent, TValue>(Func<TComponent, TValue> selector, SceneObjectHandle target)Set a cross-object-reference field by typed member selector, e.g. e.Set((Joint j) => j.connectedBody, target). The target is any scene object handle — a GameObject or a prefab instance root. Pass NodeHandle.None to clear the slot.
public OverrideHandle Set<TComponent>(string serializedPath, object value)Set a field by serialized property path (e.g. e.Set<BoxCollider>("m_Center.x", 1.0)). The target root component type is explicit since there is no selector closure to infer it from.