As you might have noticed, “m_SourcePrefab” is a reference to the Nested Prefab Asset. Now, if you search its File ID in the Nested Prefab Asset, you won’t find it. In this case, “100100000” is the File ID of an object created during the import of the Prefab, called Prefab Asset Handle, which won’t exist in the YAML.

Additionally, “m_Modifications” comprises a set of modifications or “overrides” made to the original Prefab. In Figure 12, we override the X, Y, and Z axes of the original local position of a Transform inside the Nested Prefab, which can be identified via its File ID in the target property. Note that Figure 12 above has been shortened for readability. A real PrefabInstance will typically have more entries in the m_Modifications section.

Now, you might be wondering, if we don’t have the Nested Prefab objects in our outer Prefab, how do we reference objects in the Nested Prefabs? For such scenarios, Unity creates a “placeholder” object in the Prefab that references the proper object in the Nested Prefab. These placeholder objects are marked with the “stripped” tag, which means they are simplified with only the properties needed to act as placeholder objects.

Source: Unity Technologies Blog

0 0 votes
Article Rating