Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseFor some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
Closemodification | The modification for the property in question. |
bool True if the property is a default override.
Returns true if the given modification is considered a default override.
Certain properties on the root GameObject of a Prefab instance are considered default overrides. These are overridden by default and are usually rarely applied or reverted. Most apply and revert operations will ignore default overrides.
The default overrides are:
Root GameObject
- name
Root Transform
- localPosition
- localRotation
- localEulerAnglesHint (internal property)
- rootOrder (internal property)
Root RectTransform
- same properties as in Transform
- anchoredPosition
- sizeDelta
- anchorMin
- anchorMax
- pivot
These properties are default overrides in order to prevent common mistakes when applying or reverting an entire Prefab instance. Typically, you will not want the position and rotation of a Prefab instance to get updates from the position and rotation of the Prefab Asset itself. Most of the other properties that are default overrides are similar in nature in that they relate to the basic alignment of the instance.
Using Apply All or Revert All on a Prefab instance will not affect default overrides. The only way to apply or revert a default override is to use the context menu for the property itself. This corresponds to the methods PrefabUtility.ApplyPropertyOverride and PrefabUtility.RevertPropertyOverride.
Since they are not affected by most apply and revert operations, default overrides that are overridden don't get a blue margin in the Inspector like other overridden properties do. They also don’t show up as overrides in the Overrides dropdown. They are however bold when overridden in order to make it possible to tell of they are overridden or not.
Default overrides only exists for the root GameObject (and its Transform/RectTransform) in an outermost Prefab instance. This includes outermost Prefab instances inside other Prefabs, as seen in Prefab Mode.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.