Search Unity

Improved prefabs workflow critique

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

  1. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    403
    Edit: Unity has this in preview feature, use that instead: https://forum.unity.com/threads/pre...ab-asset-editing-from-project-browser.640660/

    While we're waiting for an official solution, here is a workaround. This inspector overrides the current prefab importer editor, and allows you to see and edit values like before. It even supports multi select much like the regular inspector, and custom editors work nicely too. I also added the Open prefab button at the bottom.

    The differences are that editing values causes a reimport and reload, and that the headers are a bit different, though with some more editor scripting you can make this the same as well.

    Here is a little demo:



    Code here, just drop this in an Editor folder. Or use the attached unitypackage.
    https://gist.github.com/TJHeuvel/825c78f27a44d9411a56baa1526466c0

    Thanks Unity for the Cs reference source!
     

    Attached Files:

    Last edited: Mar 8, 2019
  2. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    312
    When I originally installed Unity 4.0 and discovered that nesting in prefabs isn't supported it was a complete shock for me. So I waited for that feature for all those years. I've upgraded my project to 2018.3 as soon as it came out, so I had the time to work with new prefabs. Currently I hate new prefab workflow so much, that I'm willing to abandon the idea of nested prefabs altogether if it means getting back old workflow benefits. New workflow creates need for so much more clicks and actions. So much time is spend opening and closing prefab editor mode. Editing prefabs now not only consumes more time, but more importantly makes whole process much more annoying and unpleasant. It's like using text editor that displays what you have typed with 1 second delay.

    I thought I will get used to it by now, because you do have some ability to edit prefab in the scene and apply those setting using overrides, but I didn't. And I still feel like old workflow was much more smooth and fast.

    Perhaps I need to give it more time. I just recently find out that you can open prefab using "P" key even when child is selected. I definitely should bind it to my mouse and start using it.

    Update: I wish P would also save changes and close prefab view. Unfortunately I also noticed that if I move camera using RMB or if I close Prefab Mode by clicking on scene in the top, P no longer opens prefab editor view :(
     
    Last edited: Jan 14, 2019
    joshcamas, Shorely, Rich_A and 2 others like this.
  3. MatthieuPr

    MatthieuPr

    Joined:
    May 4, 2017
    Posts:
    56
    I would say RMB and clicking the scene no longer set the prefab as actively selected and that is why P doesn't work... similar as if you click in the scene arrow up and arrow down no longer work to move up and down hierarchy/project.

    I would suggest to go for the double click on the prefab to open if you lost focus on hierarchy or project. There is also a keybinding to close the prefab mode, needs to be configured.

    Stage/Enter Prefab Mode <= to enter prefab mode (so can change from the P if you want
    Stage/Go Back <= to leave prefab mode (most likely traverse the prefab mode hierarchy backwards if you went down a tree of prefabs, I have noticed in 2018.3 it is currently set to O
     
  4. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    312
    Thanks for the info. I did find exit prefab mode keybinding, bind it to my mouse and I'm actively using it. Right now the problem is that when I select prefab in a scene view and hit P, nothing happens. Basically if hierarchy not the last window I clicked P doesn't work, that's the problem.
     
  5. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    312
    If someone is able to figure it out perhaps it is possible to write a scripts that when you use specific button it could select hierarchy window and trigger open prefab mode function. Unfortunately it's beyond my skill level. If it was possible to select Hierarchy with a key I could write mouse script to get this results, but it seems that it is not possible to select hierarchy window with keybinding.
     
  6. TX128

    TX128

    Joined:
    Aug 22, 2018
    Posts:
    25
    And I should do that while convincing everyone in my team to change their workflow too? I should also convince my boss about doing that? Having this kind of inheritance approach at building assets is cool in theory, but creates a rally big barrier of entry to even start to get productive. I shouldn't be supposed to put many hours of effort because Unity has decided to remove functionality.
    I'm very welcome if you can show me some shorcuts that would put all of those in a scene.
     
  7. arkogelul

    arkogelul

    Joined:
    Nov 14, 2016
    Posts:
    76
    Dude, thanks a lot !
    We just upgraded because this new version fixed a bug we had and couldn't really work around and now this ...
    We're consistently checking prefabs, comparing, editing and whatnot. It's not possible for us to keep doing that with the current version of Unity.
    I really hope the solution you provide (or anything that allows prefab Inspector editing from the Project window) will get officially integrated into the next version.
    Thanks for the time saving.
     
    TJHeuvel-net, Rich_A and Sprawl like this.
  8. Westland

    Westland

    Joined:
    Jan 26, 2015
    Posts:
    16
    Is opt-in really that difficult a concept ? Hm'h
     
  9. arkogelul

    arkogelul

    Joined:
    Nov 14, 2016
    Posts:
    76
    What do you mean ?
     
  10. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    701
    Looks like someone at Unity seems to think multiselection at the very least may happen. Found this in the source code:


    "If/when" is better than "Never" :)
     
    Westland, arkogelul and Rich_A like this.
  11. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    3,873
    They stated multiple times that they're working on it, so it's not a real surprise...
     
  12. MatthiasStuetzer

    MatthiasStuetzer

    Joined:
    Oct 5, 2016
    Posts:
    17
    It would be nice if we could at least have multiple scene tabs which focus on important prefabs then. But the way it currently works is that if I open a new Scene tab and open the prefab in it, all other Scene views follow it.

    Same for inspector tabs. I'd love to have multiple inspector tabs focused on my main prefabs I am tweaking right now.

    Constantly having to jump back and forth between prefabs in order to tweak a few numbers is so tedious.
     
  13. chemariz

    chemariz

    Joined:
    Feb 19, 2018
    Posts:
    4
    I just updated Unity last week, and I am already missing the old version. As commented by other users, there is the issue of adding two extra clicks to change the prefab properties. I can deal with that, but I have a lot of prefabs, and need to mass edit them. So... please, take mass edit back :'(

    Anyway, in case someone is having this problem, my workaround is really simple, I just created an empty scene called "Catalog" and droped all the prefabs there, then arranged them to sort them spatially according to groups, colors, or any other property that is relevant for you. Then you can select all you want, and mass editing them.
     
    MatthiasStuetzer, TX128 and Rich_A like this.
  14. arkogelul

    arkogelul

    Joined:
    Nov 14, 2016
    Posts:
    76
    You might have missed it, but someone gave away a script (at the top of the page) that allows prefab multi edition. It does the job just fine (in my project it spawns some errors when I change the name of a prefab, but it doesn't break anything).
     
  15. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    403
    Please feel free to improve that editor, i'd love to share an even better version :)
     
  16. Westland

    Westland

    Joined:
    Jan 26, 2015
    Posts:
    16
    It's just, every dam' time in anything computer related an "improvement" is made, it's forced on everyone, instead of whichever-developer doing an opt-in version of it instead (i.e. it's toggleable, so users who like the new method can use that, and oldies can keep their old method). That's one of the things Steam did right and used to do right back in the day, but noone since seems capable of implementing. It's 2k19 - srsly. That's all, friendo :)
     
  17. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    701
    Sadly, I think the way they did it, (making prefabs an asset) it forced changes no matter what. :/

    However, I think having *some* form of blending the two workflows (old and new) would have been good. For example, how about, since prefabs are considered assets, having an "apply" button like other assets? (fbx, for example)
     
  18. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    403
    With the new improved workflow we cant edit our UI anymore. It seems like its impossible to drag a gameobject to where it should be without opening it, and the Editor 100% crashes when we open the prefab. After crashing the whole prefab is corrupted, something we do see more often with the new version anyway.



    1 step forward, 5 back.
     
    jrumps, Rich_A, ihgyug and 1 other person like this.
  19. MatthieuPr

    MatthieuPr

    Joined:
    May 4, 2017
    Posts:
    56
    Did you try to recreate the prefab (I know it is horrible, but I have noticed that UI pre 2018.3 is bound to break in 2018.3 if it has some layers of complexity to it...)
     
  20. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    701
    This shouldn't happen. If it does, it's a bug that should be reported / checked if it has been fixed.
     
  21. Rich_A

    Rich_A

    Joined:
    Nov 22, 2016
    Posts:
    141
    Unity should rollback the changes for 2018.4 LTS and re-introduce them properly for 2019.1. I can't believe that this was foisted on users right before LTS. I'm thanking my stars that I'm still on 2017.4 LTS for launch and can start a fresh project in 2019.x
     
    jrumps and joshcamas like this.
  22. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    701
    I completely agree. While I personally really like Nested Prefabs (other than the annoying workflow issues), I think it would have been much much better suited for 2019.x - the whole point of LTS is to NOT have features like this thrown in at the end, especially the first LTS ever. That's insane.
     
  23. Sethhall01

    Sethhall01

    Joined:
    Jul 17, 2018
    Posts:
    6
    I've been using Unity for about a year. I'll admit the prefab workflow before was pretty "basic" and left a lot to be desired. However, I have to disagree with the nested prefab being an "improvement".

    Let's take a step back for a second and talk about why I have strong feelings about the new workflow. I was a Frostbite user at EA for many years. Frostbite has two different types of prefabs; Logic and Spatial prefabs. Logic prefabs are simply a node graph container for logic that takes inputs and outputs. These would be used in their logic graph system called Schematics (similar to Blueprints in Unreal). Spatial prefabs are full 3D containers which can contain any type of game data plus a logic node graph.Their prefab system is very intuitive to use and straight forward. It really is nothing special and that's what is great about it, they didn't overthink how they should be used. Open a spatial prefab and you get a new tab in the editor with a full 3D Viewport. Do whatever you want to your data, you don't have to have it all parented under each other in this weird hierarchy, it just lives in the prefab as is.

    Why can't a prefab just be a new viewport tab with data in it. Why do I get constant popup dialogues preventing me from making hierarchial edits within the Scene View? Constantly telling me that I have to open the prefab and make my edits. Why allow me to even drag items up and down the nested prefab hierarchy from within the Scene View if you're just going to force me to dive inside of the prefab to make the changes? I'd love to have multiple prefabs opened up in their own tabs which could be floating on my other monitor. I could edit things so much easier if I had everything I needed right there, opened up. This hijacking of the Scene View is so bizarre and disruptive. Why can't an opened prefab just be a new tab named whatever the Game Object is named? Yes, you could argue that a new tab is still taking you out of the Scene View but once it's opened, its opened! You can easily bounce back and forth especially if you have two monitors.

    I feel like, at the root of this feature, prefabs should very simply just be a 3D container of data. Open it up, get a new viewport tab named whatever the prefab is named then manipulate some data, balhblahblah, do whatever. Save. Instead, you have a cumbersome stack of data in the Hierarchy that is a pain in the ass to re-order unless you dive into the prefab which takes you out of the scene view. Rinse\repeat about 900 times throughout the day ................... argh.

    Am I missing something here? I'm hoping someone can enlighten me on how to have a better life while trying to work with this cumbersome system. I feel like this system is two steps forward and one step back.
     
  24. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,577
    That's up to interpretation, but
    1. The new Prefabs system was not a blank slate where we could do whatever we wanted. It's implemented as a backwards-compatible continuation of the old Prefab system, with lots of existing implementation details setting the limits for what's possible and feasible to do or not.
    2. You didn't mention anything about overrides in all of your discussion. Overrides make things much more complicated compared to a system without a concept of overrides to Prefabs. This means it's very far from being "just a 3D container of data". Rather, you have Prefab instances that can get more and more altered compared to their Prefab Asset, but must still stay in sync with them regardless. We had to make some tradeoffs related to that.
    3. Have you seen the FAQ? There are lots of things we wish we could have done and a few of them we are working on doing.
    As to how to have a better life, our recommendation is to only modify instances in the scene if you want those instances to be different from the Prefab Asset. If you actually want the Prefab Asset to be modified (and all instances with it), then modify the Asset (through Prefab Mode), not the instance. We know you lose the context of the scene when going into Prefab Mode, and we'd like to address that but it wasn't possible for the initial release.
     
    TJHeuvel-net and optimise like this.
  25. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    418
    Are you currently working on getting back the ability to edit Prefabs directly in the Project Browser?
     
    jrumps and ratking like this.
  26. ratking

    ratking

    Joined:
    Feb 24, 2010
    Posts:
    198
    I still wonder why such a crucial feature, half-finished on top of that, had to go into a 2018.x release. It doesn't make much sense.

    Also, I still recommend having both prefab workflows, with the new prefabs being "Nested Prefabs" as an extra thing.
     
    jrumps and Rich_A like this.
  27. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,577
    Because the overwhelming feedback we've gotten is that it is a big net positive. There is a small group of people here on the forums and elsewhere who don't agree in that assessment, but that doesn't change the overall picture we've gained from looking across all channels, though we do of course keep it in mind and take it into account in our prioritizations.
    As we have said lots of times, that was just not viable at all. The system is not a package or anything like that but makes thousands of changes across the codebase to aspects of Unity's handling of GameObjects and components that is quite fundamental. It's not something we can have two side-by-side implementations of simultaneously.
     
  28. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,577
    Yeah, editing of the root GameObject of the Prefab Asset. We've hit quite a few issues with this, but it looks like we can make a limited form of editing possible that is fairly similar to what was possible before.
     
    MatthieuPr, joshcamas and optimise like this.
  29. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    418
    Awesome. Will the fix ship at 2018.3 cycle?
     
  30. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,577
    That is the plan.
     
    TJHeuvel-net, Gua and optimise like this.
  31. Rich_A

    Rich_A

    Joined:
    Nov 22, 2016
    Posts:
    141
    Was it ever considered to dump the old system and replace it completely in 2019.1? With all the changes coming in 2019 - HDRP/LWRP, graph modules, package manager - how many projects are really being upgraded all the way through without significant re-engineering? I feel like this constant need for backwards-compatibility is hamstringing Unity. Now you have the LTS program, can backwards compatibility be less of a requirement?

    I feel like this middling approach is unsuitable for existing projects (so many seem to have broken anyway, at least from reports here) and for new projects (the poor workflow).

    If you're getting positive feedback from other channels (which I hope is from corporate-grade users, not from the Reddit crowd) then please work some influence to share that with the broader community. So far I havn't seen any positive reports or instructional information on the new interface from people who are using it for actual commercial productions (ie. outside of hobby or test projects).

    For example: https://unity.com/prefabs

    Everything here is just Unity marketing. Where are the *real life examples*?
     
    interpol_kun and jrumps like this.
  32. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,577
    It's really not our duty to share all the feedback we get with you just because you happen to not trust us, and a lot of it is confidential.

    But here, have some tweets.
    https://twitter.com/planettimmy/status/1061634675511152640
    https://twitter.com/hellobard/status/1075130014566412288
    https://twitter.com/dilmerv/status/1076518161648742400
    https://twitter.com/sirkawaine/status/1076617678574501889
    https://twitter.com/DazEdword/status/1079447581779021825
    https://twitter.com/pentadact/status/1083809380380930048
    https://twitter.com/alvarisfalcon/status/1083716214625464320
    https://twitter.com/KeevaWinters/status/1086759270660694024
    https://twitter.com/jonkristinsson/status/1088177374926127105
    https://twitter.com/biphenyl/status/1091026398184120321
    https://twitter.com/sebify/status/1096071248684163072
    https://twitter.com/mp_labs/status/1097627307718647808

    Just a small sample that are easy to share. This is of course a different format from when we sit down with people from a studio and get detailed feedback from them, but should still help to give an idea.
     
    Rich_A likes this.
  33. Sethhall01

    Sethhall01

    Joined:
    Jul 17, 2018
    Posts:
    6
    Was there an opportunity to architect a new system that would offer a bit more flexibility in the workflow?

    Overrides are absolutely a possibility in Frostbite's systems. Nesting prefabs is also possible. You could opt-in parameters within the prefab that you wanted to override when placed within a level. So, for example, I could have 10 instances of the same prefab in my scene within Frostbite and all of those instances could have their own unique parameter settings. You can also manually transform the items within the prefab from your scene view, etc. Very similar feature set in the grand scheme of things although the workflow as 100% different.

    Nope. I will now.
     
  34. Sethhall01

    Sethhall01

    Joined:
    Jul 17, 2018
    Posts:
    6
    @Rich_A and @runevision ,

    The pendulum swings both ways when trying to satisfy everyone. You're always going to find those who love and those who hate what you've done. I've shipped enough games to see critics and community responses to what you've spent years making :) Can't please everyone.

    The tweets are cool and I'm glad others are having a smoother time with the tech! As a user myself, the flexibility and workflow discrepancies leaves a lot to be desired and I truly hope as time passes Unity will be able to take this initial release and polish it up a bit. Doesn't matter how great the tech is if its a pain in the ass to use. Especially if you've forced everyone to adopt this new workflow.

    Software developers should define what "Quality of Life" should be when creating features that users will end up using a lot. I don't think you'll see a very large group of people that love using software that decreases daily effectiveness and causes headaches. Especially with a brand new forced workflow.

    Unfortunately for me I have no other option with my current job role so I am going to continue to try to hash out the best workflow I can. I'd have rather seen a focused effort into a new system for 2019 to augment all the other interesting bells and whistles you guys have announced.

    I appreciate the responses @runevision ! Looking forward to seeing what else you guys do with this system in the future.
     
    jrumps likes this.
  35. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    312
    After another 5 weeks of using it. I still hate it and believe that workflow degradation significantly outweighs improvements that we got with nested prefabs. Soon I'll try to downgrade my project to 2018.2. I know, that it might not go well, but I'm desperate enough to try.

    Update: It didn't worked. Looks like I'm stuck with new prefab workflow :(
     
    Last edited: Feb 25, 2019
    jrumps, TJHeuvel-net and ratking like this.
  36. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    403
    Today was the first time since upgrading that we found a clear use in which there was a benefit from using variants, hoorah! It actually worked quite easily and as expected.

    Too bad every other day we lose productivity because of the workflow regressions.
     
    Rich_A and jrumps like this.
  37. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    701
    I have an open world game, and nested prefabs has truly made building it way way more productive, and has made my project much more realistic to make. However, I think most people have an issue with the whole "edit prefab in another window" feature, which while cool hasn't been that useful for me. So that's my use case I guess.

    (However it's possible the prefab scene feature was some sort of requirement for getting nested prefabs to work)

    Regardless I really hope they fix the multiselection issue (as well as the editing the root without going into edit mode) cause oh boy that really is painful.
     
    Rich_A and jrumps like this.
  38. Sethhall01

    Sethhall01

    Joined:
    Jul 17, 2018
    Posts:
    6
    I hope they fix the functionality of this feature. It has potential to be a massive improvement. Unfortunately it feels very rushed and pushed out the door. I have been using them since they were pushed and still to this day find myself cursing over how stupid the workflow is. Sounds so banal to complain over something so trivial but its a massive component to this piece of software and how you manipulate data. it is driving me crazy.
     
  39. DAh-Right

    DAh-Right

    Joined:
    Mar 9, 2015
    Posts:
    28
    Bad editor labels width:
    upload_2019-3-8_11-56-39.png


    How to fix it : Additional editing of OnInspectorGUI() :

    upload_2019-3-8_11-54-42.png

    Function code to copy-paste:


    Code (CSharp):
    1.  public override void OnInspectorGUI()
    2.     {
    3.         for (int i = 0; i < targetEditors.Length; i++)
    4.         {
    5.             EditorGUIUtility.labelWidth = 0;
    6.             targetEditors[i].DrawHeader();
    7.  
    8.             EditorGUI.BeginChangeCheck();
    9.             targetEditors[i].OnInspectorGUI();
    10.  
    11.             //When the object is changed it is reimported, and our editors point to incorrect objects. Restart to create new editors!
    12.             if (EditorGUI.EndChangeCheck())
    13.             {
    14.                 OnEnable();
    15.                 return;
    16.             }
    17.         }
     
    TJHeuvel-net likes this.
  40. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,577
    We have a preview build of the official solution available now. Check it out and let us know how it's working out for you.
    https://forum.unity.com/threads/pre...ab-asset-editing-from-project-browser.640660/

    Since the official solution relies on our own PrefabImporterEditor, you'll probably need to disable your own one when testing the preview build in order not to get undefined results.
     
  41. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    403
    Thanks so much, looks really great. Exactly what i think was missing, quickly seeing and editing a preview of the prefab is such a time saver.

    Thanks, i've added this to the gist.
     
  42. arkogelul

    arkogelul

    Joined:
    Nov 14, 2016
    Posts:
    76
    Thank you guys so much. That's great !
    I will try it on my real game project, hope it'll be included in a proper version soon !
     
    Last edited: Mar 12, 2019
  43. tbriley

    tbriley

    Joined:
    Sep 10, 2013
    Posts:
    110
    these posts are old so maybe i'm misunderstanding something that has changed but i'm not seeing the issue here...

    ...and here...

    why not edit the prefab in the context of the scene and just apply the override if you're happy, or revert if not, or leave it as an overridden property? am finding this workflow very nice myself.

    though i do agree that 'One more click' to edit from a root is very annoying when you are performing the operation hundreds or thousands of times a day (hopefully we get this in 2018.3 or at least 2018 lts soon...).

    one thing i would really, really, really, (really) like to see though is the override / revert dropdowns included on nested children from both scene and prefab views. i'm finding it extremely cumbersome to have to navigate up to the root every time i want to apply a change, where the override / revert dropdown often lists dozens of changes to sort through to get to the one i want. iirc this was described in one of the demo videos as being too confusing for users but i was actually confused the other way around, thinking 'where's my revert / apply option on the child'? i realize i can right-click on individual properties and apply, which is nice, but not enough. the dropdown quickly shows me a list of everything i'd be applying (which should only show properties for the selected child, not all the way back up the hierarchy) and 1-click to just apply everything. please make this happen.
     
    Gua likes this.
  44. Marc-Saubion

    Marc-Saubion

    Joined:
    Jul 6, 2011
    Posts:
    275
    @tbriley , when you make some local changes on a prefab, you can right click it and chose to revert or override it to the prefab of your choosing. I work this way and only use the override dropdown when I need an overall view on a complex prefab.

    I think this is the feature you're looking for.
     
  45. tbriley

    tbriley

    Joined:
    Sep 10, 2013
    Posts:
    110
    @Marc-Saubion nah, it's nice but not enough - i want (need?) the override dropdown for the children. especially for things like ui, i am often tweaking loads of nested settings in a child and then want exactly this overall view, without having to go up to the root, which itself and it's other children also often have overrides i have to sift through. for me, it's also the expected behavior.
     
  46. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,577
    Here's just a few of the reasons an overrides dropdown for nested Prefabs causes confusion (as we observed back in development).

    Imagine you have Prefab Outer with Prefab Inner inside. Inner has a scale of 1,1,1 but Outer has an override to to the scale of Inner so that it's 2,2,2. It will appear as an override if you go in Prefab Mode for Outer.

    Now, in the scene, Inner, which is nested in Outer, has a scale of 2,2,2. It doesn't appear as an override, because it's not a change in the scene. Everything you see in the scene has the same values as it does in Outer.

    Yet, if an Overrides dropdown existed for nested Prefab Inner, you'd see a comparison between the scene values 2,2,2 and Inner's own values of 1,1,1. It would be different, and yet it's not an override.

    Or more confusing yet, imagine that this property is also overridden in the scene, to a value of 1,1,1. Now the comparison would show values 1,1,1 in the scene and 1,1,1 as Inner's own values. Yet if you apply, it makes a crucial difference; Not only will Inner get values of 1,1,1 (it already has, so no difference) but Outer will have its override to 2,2,2 removed so that it too has values of 1,1,1. Why? Because if we only applied the change to Inner but didn't remove the override in Outer, then the value in the scene would change from 1,1,1 to 2,2,2 immediately after applying. And that would be super weird, since applying is not supposed to change values on the instance.

    Another confusing thing: if Outer adds a child inside the nested Prefab Inner, then this child exists under Inner inside Outer, but not in Inner itself. Now, you can make overrides to this child in the scene, but you won't be able to apply them to Inner, because the object doesn't exist in Inner.

    Thing get even more confusing if there's more levels of inheritance, whether via more levels of nesting, or via Variants, or a combination. The overrides dropdown is simply not well equipped to display changes between a Prefab and a deep ancestor of that Prefab that skips one or more Prefabs in between that could have their own overrides as well.

    And sure, theoretically there are ways to present additional information. The comparison view could have N columns side by side instead of only two, or we could have advanced markup on overrides that somehow indicate how many levels down overrides exists, or if there's multiple overrides at multiple levels. But this all adds complexity. And confusion. And anxiety. For a lot of people. And it would be super complicated to design and implement on top of that. Spending that many resources on something which may help a few and confuse a lot is not resources well spent compared to all the other improvements we could be working on that have much better tradeoff balances.
     
  47. tbriley

    tbriley

    Joined:
    Sep 10, 2013
    Posts:
    110
    in recreating this scenario to provide screenshots i apparently ended up borking my project entirely -> i seem unable to save changes now when editing prefabs from prefab view. this is on 2019.1.0b5. i'm not sure precisely what triggered it, though at one point i'd mistakenly tried circular nesting and got an error. i'll try to reproduce it when i have time.

    i don't doubt there are difficult edge cases to consider; it was very clear watching the demo videos that nested prefabs was one of the things unity spent a LOT of time testing. maybe i am one of the "few", but i've had plenty of moments of confusion myself over the last weeks wondering why a change wasn't showing up in the scene when it seemed like it should, or making mistakes because i gave up hunting through a list of dozens and dozens of nested changes and simply mass applying changes to the root because there are no nested override buttons.

    your research may have shown differently, or maybe you were under pressure to release, but for me these things are only confusing when something isn't clearly communicated. i hope you'll bear with me, i'm sure you've gone through a lot of these scenarios already. i'll use pictures and try to be clear and quick. take prefabs A, B, 1, 2, and 3. there are no visible overrides anywhere in the scene:
    upload_2019-3-13_22-46-57.png


    go into prefab 2 and nest prefab 4:
    upload_2019-3-13_22-49-4.png

    prefab A and B now look like this in prefab mode and in the scene:
    upload_2019-3-13_22-49-47.png


    some time passes and i go work on some other things. later, i return here and want to modify something. when i click to dive into prefab 3, i fully expect to see prefab 4, but i don't. it's not the end of the world, i only have to realize what's going on and do a small amount of hunting to find the override root (or try deleting prefab 4 here and get the open dialog).

    this next example will be more like the one you posted. in prefab A i'll modify prefab 3's scale:
    upload_2019-3-13_22-55-28.png

    nice! i'll go work on something else. maybe some hours or days later i'll decide prefab 3 in prefab B looks best like this:
    upload_2019-3-13_23-0-0.png

    the forums won't let me attach any more pictures, but as you know, in the scene view there will be no communication of overrides. which seemed fine at first. you apparently think this is more natural? or your test users did? but when i go to modify the base prefab 3 and am not seeing my changes in the scene, that's confusing to me. i see nothing communicated in the scene that an override is happening, nor anything in multiple other levels of inheritance. so it's more hunting and head scratching and at some point i give up again and just enter the values in the scene view and click "apply all" again and hope i didn't muck something up somewhere.

    this for me is the common case. nowhere near crazy edge variant world yet. and it sounds small. but when you're in the middle of a big project, or in our case, more often multiple small to medium sized projects, this kind of small, common thing becomes a huge mental load. and i'm supposed to somehow communicate all of this to a multilingual team of artists, designers, and programmers.

    of course the design is complicated. we all deal with impossible sounding requests or edge cases every day, whether we're on the engine team or building the next great virtual sandwich tech. but i've been waiting more than 6 years for this essential feature and while it ticks a lot of boxes, i still find the basic functionality confusing.
     
    Oshigawa likes this.
  48. Cathero

    Cathero

    Joined:
    May 3, 2018
    Posts:
    5
    One feature I personally miss is something like the Overrides dropdown when working in Prefab Mode (with auto-save off).
    I understand that in Prefab Mode I directly modify the prefab asset rather than an instance, so the diff shown there would not be "prefab asset (saved state) vs this prefab instance" but rather "prefab asset (saved state) vs prefab asset (pending changes)".

    As for the why, there are situations where I make several adjustments to a prefab in Prefab Mode, but then decide I don't actually want to apply save all of them (or just notice I made an error/unintentional change somewhere).

    Then I can either exit prefab mode and discard all the changes, enter prefab mode again and then manually redo all intended changes. Or I hope the undesired change was "almost last" in line, spam Ctrl+Z until I get to that point (thankfully some bug preventing undo on "Driving RectTransform" is fixed by now), then manually redo any intended changes after that point.

    Compared to editing a prefab instance where you get a nice list of all changes overrides and can easily do a partial revert/apply, have blue marks for all pending changes, etc. I feel the prefab mode is just lacking something similar.
    In Prefab Mode, while not being necessary all the time, having this more finegrained control and information would sometimes be very helpful to have and avoid wasting time and making errors.
     
  49. KB73

    KB73

    Joined:
    Feb 7, 2013
    Posts:
    166
    I'm guessing this is going to be impossible to do but would it be feasible to have an option to switch the project to one prefab system or the other? We don't want to use the new system as we cannot edit child nodes efficiently in the project view and it is killing our workflow for our current projects.

    This means we're locked in on 2018.2.21 now and have no way to upgrade because nobody wants to use the new system....
     
  50. TriNityGER

    TriNityGER

    Joined:
    Sep 1, 2017
    Posts:
    29
    We're in the middle of upgrading of all our prefabs to the new nested prefab workflow. Till now we used the Prefab Evolution plugin for nesting support but it got abandoned and got quite buggy with the new unity versions.

    While the new workflow is good overall, theres one very, veeeery big thing that almost kills nested prefabs:
    Reordering and removing gameobjects from instances/variants.

    I've read that the "disconnected prefab" thing is currently not compatible and was buggy.
    However I strongly appeal to you to add this in a future version! It is quite useful and we're used to it due to the plugin that supported such actions.