Description
The DontBreakAsTemplate
property of the PrefabFile
class determines whether a prefab should remain intact when it is instantiated as a template. If set to true
, the prefab will not be broken apart, preserving its original structure and behavior. This can be useful when you want to ensure that the prefab's components and settings remain unchanged when used as a template.
Usage
To use the DontBreakAsTemplate
property, simply set it to true
or false
depending on whether you want the prefab to remain intact when used as a template. This property is particularly useful in scenarios where maintaining the integrity of the prefab is crucial.
Example
// Example of setting the DontBreakAsTemplate property
PrefabFile myPrefab = new PrefabFile();
myPrefab.DontBreakAsTemplate = true;
// This ensures that when myPrefab is used as a template, it will not be broken apart.