Search Unity

How do you override a Pre-fab's Transform?

Discussion in 'Prefabs' started by AcademyOfFetishes, Jan 2, 2019.

  1. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    I have a prefab. I dragged it into the scene and changed its Y position from 0 to this:



    But in the overrides dropdown, it doesn't see it as a change:


    The workaround is to get it looking right in the scene, then copying and pasting the transform values into the prefab after editing it directly. This seems strange, like a bug maybe? Shouldn't I be able to override transform changes on a prefab that's in my scene? Regardless, this workflow is very inconvenient, so I'm wondering if there's a better work around than I've found.
     
  2. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    3,616
  3. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    > This is because it is extremely rare to require multiple instances of a Prefab to take on the same position and rotation.

    I must be doing something wrong then. Usually, my prefab's are placed in my scene as a child and their position is relative to different parents. In this situation, I think it makes sense to want to override the transform.
     
  4. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    596
    An Override is not the same as to 'overwrite', meaning replacing the prefabs position with the currently edited one. Overrides are a different concept, and with unity not considering instance transforms overrideable the only thing that's missing there is the convenience-button to apply the values to the prefab. You can still copy and paste the transform values into the prefab and it works as usual (and as you said you want it to work).
     
  5. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    436
    An improvement to how the overrides on the root transform is handled is coming.
    If not already in the current patch release then the next patch release I believe.

    What will happen is that the root transform will now show position and rotation in bold to indicate they are overriden but they root override will not show up in the overrides dropdown as that would be noise.
    The root overrides can be applied or reverted by right-clicking on the properties and using the context menu.
     
    AcademyOfFetishes likes this.