Search Unity

Can't apply overrides to Prefab

Discussion in 'Prefabs' started by Oshigawa, Sep 21, 2018.

  1. Oshigawa

    Oshigawa

    Joined:
    Jan 26, 2016
    Posts:
    362
    Hi guys, i don't know if i'm missing something, but i can't apply overrides to the object in the scene. To make things worse, for some objects it works, for some it works partially (overrides some changes to children, and others can't be applied, like in the gif), and for some, like in the gif, it doesn't work at all.

     
    tugrulsubekci likes this.
  2. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    Can confirm this bug exists... but don't know why or how it occurs.

    Similar situation, in a canvas, a couple of changes to a TextMeshPro object aren't being overridden.
     
  3. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    I know a little more, about my similar situation.

    The overrides are being done, they simply remain in the Inspector Override dropdown appearing as though they're not done.

    My changes are all being made to TextMeshProUGUI element values. Size, anchors, drawRect etc.
     
  4. Discmage

    Discmage

    Joined:
    Aug 11, 2014
    Posts:
    60
    It could be because the things you are editing in the prefab are 'outside' the prefab? I found that this was the case in one of my projects. If you drag and drop an item into a prefab from the main scene, and try to apply that, it doesn't like it as that is not accessible to the prefab itself.
     
    mc_fragezeichen likes this.
  5. Leohd

    Leohd

    Joined:
    Feb 7, 2017
    Posts:
    32
    I can't apply override neither, the bugs are piling up.
     
  6. Peter_123

    Peter_123

    Joined:
    May 26, 2015
    Posts:
    8
    Same problem. It seems that overrides do get applied. Git found changes in the prefabs, so they presumably were applied. However they are still shown in the Inspector as if they were not applied.
     
  7. pietrodenicola

    pietrodenicola

    Unity Technologies

    Joined:
    Dec 8, 2020
    Posts:
    43
    If you make a small repro project and attach it to a bug report, I'd like to have a look at your case.
     
  8. Robosimar

    Robosimar

    Joined:
    Jun 14, 2021
    Posts:
    6
    I am also having same problem. I click on Override, But is Still shows the option to Apply overrides.
     
  9. Robosimar

    Robosimar

    Joined:
    Jun 14, 2021
    Posts:
    6
    Hey pietrodenicola! Is the bug fixed ?
     
  10. dennik

    dennik

    Joined:
    Nov 23, 2011
    Posts:
    101
    I'm having the same issue with Unity 2019.4.13.f1
     
  11. Rs

    Rs

    Joined:
    Aug 14, 2012
    Posts:
    74
  12. pietrodenicola

    pietrodenicola

    Unity Technologies

    Joined:
    Dec 8, 2020
    Posts:
    43
    Hello.
    We are currently working on a bug of this kind. But, to be honest, it's hard to say whether it is the same bug, caused by the same issue, or another bug that just happens to show the same symptoms. That's why I asked you to make a bug report, with a small repro project attached, so that we can have a look at it. Thank you.
     
  13. gascajosh23

    gascajosh23

    Joined:
    Nov 30, 2021
    Posts:
    1
    is the bug fix yet it still wont let me apply anything
     
  14. Largehare

    Largehare

    Joined:
    Nov 7, 2021
    Posts:
    3
    In one case, you can't reference an object that is in scene. you should reference it from asset(disk file)
     
  15. Mads-Nyholm

    Mads-Nyholm

    Unity Technologies

    Joined:
    Aug 19, 2013
    Posts:
    219
    We need more information about what components and properties this issue is happening for.
    Please provide more info in this thread or submit a bug report.
    Thank you
     
  16. abdulkhadersab

    abdulkhadersab

    Joined:
    Sep 7, 2017
    Posts:
    4
    Screenshot 2022-02-26 232011.jpg i cannot apply any of the modifiers , as such the apply button is greyed off, cant add mesh for any fbx files i have created from blender. even the position is also not modified and is not updated or applied, but all the functions happening correctly, maybe it might create trouble while baking the end product.
     
  17. Peter_Olsted

    Peter_Olsted

    Unity Technologies

    Joined:
    Apr 19, 2021
    Posts:
    75
    What it seems like is that you are trying to apply changes to a model (like a fbx file).
    If you were to apply these changes and update the model, they would all disappear if the model get reimported.
    Instead you need to create a variant based on this prefab and then you can apply the changes.
     
    dkarpov_bhvr and avidwriter like this.
  18. LT23Live

    LT23Live

    Joined:
    Jul 8, 2014
    Posts:
    98
    @Peter_Olsted this is still a problem today. It is true it used to be a exported model. I unpacked it completely and created a new prefab and now I still cannot apply it.
     
  19. Mads-Nyholm

    Mads-Nyholm

    Unity Technologies

    Joined:
    Aug 19, 2013
    Posts:
    219
    Please provide more information like screenshots of the overriddes you are trying to applying or better a video that shows the situation.
     
  20. Mads-Nyholm

    Mads-Nyholm

    Unity Technologies

    Joined:
    Aug 19, 2013
    Posts:
    219
    Some components are automatically generating overrides so after you apply it looks like it is still overriden even though the value was in fact applied to the Prefab Asset.
     
  21. harundmrpnce

    harundmrpnce

    Joined:
    Feb 25, 2023
    Posts:
    1
    I have the same issue, and I've found why is that happening. When I try to attach a gameobject like a TextMeshPro onto a textmesh variable of a script in main prefab, it doesn't attach. If I could upload a video, I would show the problem.
     
    Last edited: Mar 27, 2023
  22. Peter_Olsted

    Peter_Olsted

    Unity Technologies

    Joined:
    Apr 19, 2021
    Posts:
    75
  23. Basically_Malware_Games

    Basically_Malware_Games

    Joined:
    Jun 3, 2022
    Posts:
    1
    Ok so I had the same bug.
    Player prefab would not apply changes to the prefab.
    found out it looked like it could not make changes to the parent prefab without the items that needed to be in the prefab also as a prefab. once I made the images or texts i was trying to change into prefabs i could manually add them to the original prefab and they would then save. not sure why this happened but it did and it was very annoying haha.
     
  24. Sealer0

    Sealer0

    Joined:
    Jul 24, 2018
    Posts:
    6
    So while making screenshots for this bug, I think I got closer to figuring out why it happens. Here's how I reproduced it:

    This happens often when working on new scene made from a template:

    Added a new script (green +: PlayerAnimEvents) to a child object of my prefab: Applied to Model, prefab is Player
    UnityPrefabOverrideBug_00.png

    Apply Override to save the prefab changes UnityPrefabOverrideBug_01.png
    Create a new scene from a template (can also test by double clicking the Prefab that was supposed to be changed in inspector): UnityPrefabOverrideBug_02.png The changes applied before are not in the prefab loaded into the scene nor are they in the prefab when double clicking from the project view.
    UnityPrefabOverrideBug_03.png
     
  25. Sealer0

    Sealer0

    Joined:
    Jul 24, 2018
    Posts:
    6
    Note that the scenes I was working on were made from a template and not saved before applying override. I tested it while loading the actual template scenes, instead of creating new scenes and it worked as expected (no bug).
     
  26. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    470
    I found that bug too and it concerns a prefab variant.
    I added an instance of that variant in a scene, made some changes to a scripted component placed on the root game object of that instance, but options to apply the changes to the source are grayed out, both for the prefab variant and the original prefab the variant is based upon.
    The only solution I found was to copy the component and directly paste the values onto the prefab variant.