PrefabInstanceSpec class

The data that makes a NodeSpec a prefab instance: a reference to another .fscene plus the per-instance delta (overrides and added/removed content). The prefab composer applies these against the referenced document; a plain node leaves NodeSpec.instance null.

Constructors

PrefabInstanceSpec({required AssetRef source, LoadPolicy load = LoadPolicy.eager, List<PropertyOverride>? overrides, List<Attachment>? attachments, List<LocalId>? removedNodes, List<ComponentSpec>? addedComponents, List<String>? removedComponentTypes})
Creates a prefab instance of source with an optional delta.

Properties

addedComponents List<ComponentSpec>
Components added to the instance's root that the prefab does not have.
final
attachments List<Attachment>
Host-scene nodes grafted into this instance under prefab-local parents.
final
hashCode int
The hash code for this object.
no setterinherited
load LoadPolicy
Whether the instance's content loads eagerly or streams in.
final
overrides List<PropertyOverride>
Per-property overrides applied on top of the prefab.
final
removedComponentTypes List<String>
Prefab component types suppressed on this instance's root.
final
removedNodes List<LocalId>
Prefab nodes (by their local id in the prefab) suppressed on this instance.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source AssetRef
The referenced prefab .fscene.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited