Prefab Instance Component: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
(Wording updates on adding component and its restrictions) |
||
Line 1: | Line 1: | ||
The prefab instance component is a [[:Category:Gameplay Components|gameplay component]] that creates an instance of a given [[Prefab Asset]]. | The prefab instance component is a [[:Category:Gameplay Components|gameplay component]] that creates an instance of a given [[Prefab Asset]]. | ||
Prefab Instance components cannot be added to gameobjects that have child gameobjects in the hierarchy. They must be added to an empty gameobject that has no other components attached. | |||
While a prefab instance component is attached to a gameobject, that gameobject cannot have any child gameobjects added, cannot have any more components added and will be given a unique icon and color in the hierarchy. | |||
[[Category:Gameplay Components]] | [[Category:Gameplay Components]] | ||
[[Category:Components]] | [[Category:Components]] |
Revision as of 00:33, 4 November 2022
The prefab instance component is a gameplay component that creates an instance of a given Prefab Asset.
Prefab Instance components cannot be added to gameobjects that have child gameobjects in the hierarchy. They must be added to an empty gameobject that has no other components attached. While a prefab instance component is attached to a gameobject, that gameobject cannot have any child gameobjects added, cannot have any more components added and will be given a unique icon and color in the hierarchy.