Search Unity

Having to go into prefab mode to reorder children is a MASSIVE regression

Discussion in 'Prefabs' started by greengremline, Aug 16, 2019.

  1. greengremline

    greengremline

    Joined:
    Sep 16, 2015
    Posts:
    183
    Hey,

    So let me preface this by saying the new prefab mode brings a lot of benefits. Nested prefabs is a huge time saver in some areas. Thanks for finally implementing it!

    However, there is one use case that has killed productivity for our artists. It makes no sense to require you to go into prefab mode in order to restructure the hierarchy of a root level prefab in a scene. This requirement has made what used to take a second take anywhere from 5-60 seconds (especially if for instance the camera placement changes when switching between scene and prefab mode. Spoiler alert: it does.)

    Our use case is that we use prefabs, not scenes, for all of our environments (since we are a procedural game). However, we need to be able to edit multiple prefabs at once without requiring the artist to go into each prefab separately. In addition, the prefab editor is not the same as the scene editor - going into the prefab editor messes the camera up. It's really killing our productivity in a real world use case for a game with a lot of assets.

    There shouldn't be any technical limitations on reordering a prefab in a scene, as you can go into that prefab and reorder it and have it update the asset. We aren't asking to be able to reorder nested prefabs inside of a prefab, however we would like the ability to reorder direct prefab children when that prefab is in the scene, and have it automatically save the asset just as it would if we went into prefab mode.

    This is a massive regression on an otherwise well-needed system, which has really killed our productivity in several areas

    TL;dr, needing to go into prefab mode just to reorder children is a massive regression and HUGE waste of time, increasing the time per action from around 1 second to 5-60 seconds. We'd like the ability to reorder direct children of a prefab in a scene without going into prefab mode, in order to allow multi-prefab editing as well as not break artist flow
     
  2. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,338
    Apparently, the current next step for prefab editing is this.

    You could try to load your project in that preview and see if that fixes the issue for you.
     
  3. greengremline

    greengremline

    Joined:
    Sep 16, 2015
    Posts:
    183
    Thanks for the link! While this is closer to a better solution in general, it's sadly nowhere near what we need to fix our use case
     
  4. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    Give more feedback to unity and perhaps it will get better.
    I just went back to 2017.4 because I just want to focus on creating my game, then later I can upgrade when all the workflow issues of the new prefabs are addressed.
     
  5. greengremline

    greengremline

    Joined:
    Sep 16, 2015
    Posts:
    183
    Thanks, where do you recommend I give feedback other than the forums? It'd be nice if a Unity developer responded to this thread - we're a pretty sizable indie game at this point so it's not like we're just a couple of college freshmen playing with the new prefab system thinking it's flawless because we don't know real world use cases.
     
    Last edited: Aug 18, 2019
  6. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
  7. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,892
    Can you describe in more detail what kind of operations you used to do where you needed to edit the hierarchy of multiple Prefabs at the same time? Maybe record a video (with a version of Unity prior to 2018.3) of typical operations you would do?

    And what it is specifically that makes it go from one second to 5-60 seconds? Is it opening Prefab Mode that takes a long time in your project, or something else?

    Like we've said a few times, Prefab instances never supported reordering the hierarchy without also breaking the Prefab connection, meaning the Prefab instance would no longer get updates from the asset. And we couldn't keep support for broken Prefab connections because it was incompatible with nested Prefabs. The closest equivalent is to break the Prefab connection, make the edits, and reconnect by dragging the GameObject (that used to be the Prefab instance) onto the corresponding Prefab Asset. Of course, that's not a great workflow to do on a regular basis.

    The fact is however, that making it possible to edit the hierarchy while supporting nested Prefabs at the same time would be a ton of non-trivial work figuring out a whole new way to make this work. Imagine making an automatic merge tool that can handle stuff being moved all over the place, and you get an idea of the challenge involved. So this may likely not be viable. However, we're interested in understanding and addressing people's problems as much as possible. For this to work out, we need to understand the problems, separate from solutions, so we can consider what potential viable solutions there might be that could address the problems.
     
    greengremline likes this.
  8. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,338
    The thing that you can do in pre 2018.3 versions that you can't do anymore is this:

    prefab.gif

    That didn't break the prefab. Right now you can't do that.

    Adding props to a prefab in order to make it unique is a pretty common thing to want to do. In 2018.3+, you have to create a variant to achieve that. And that's going to be annoying when you're doing a beautification pass over the scenes and want to add many different minor details to the same base prefab - you'll end up with a ton of prefab variants cluttering your hierarchy.

    Also I believe you've written that prefab editing speed is slowed down by variants? So that's just bad on top of bad.

    The end result is that we have to do work-arounds that are painful enough that games will just end up looking worse.


    I believe that, as for a bunch of other issues with 2018.3 prefabs, the solution is to have siblingIndex be a thing that you can override. Then there's a million things you "can't do because that would break the prefab" that suddenly wouldn't break the prefab anymore. You'd also fix the prefab system being near-useless with UI elements due to reordering not being supported.
     
  9. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,892
    No, you can add children to a Prefab fine as long as it's at the end and not inserted in between children that belong to the Prefab.

    In the gif above, this would be achieved by dropping onto the parent you want it to be a child of instead of dropping it in between children (or right before the first child, as it's shown here).

    This creates some limitations for UI but not for the use case you describe.

    I misread this the first time around.

    You mean for reordering siblings of objects that are part of a Prefab?

    For anything other than UI, this would make no practical difference (apart from if you prefer some elements to be above others in the hierarchy, but not sure why you'd want this to be different in an instance compared to in the asset.) It wouldn't allow reparenting just because you had control over sibling index.

    [Edit] I realize now the original post title refers to "reorder children". But it's not clear to me if this really is only reordering siblings, or if it's implied it means reparenting too. I have assumed the latter due to the reference of needing to edit multiple Prefabs at the same time, which makes most sense to me if it's about moving objects from one parent to another.
     
    Last edited: Aug 22, 2019
  10. greengremline

    greengremline

    Joined:
    Sep 16, 2015
    Posts:
    183
    Thanks so much for responding! Really appreciate what you guys are doing, hopefully we can find a solution that improves the prefab experience even more!

    So here's a screenshot of our workflow:

    upload_2019-8-22_11-46-24.png

    At the top level, these are our 'room' prefabs. These room prefabs are never nested inside of other prefabs. What we are interested in is the ability to add and reorder children of these prefabs in scene mode
    Previously, we could do so and then hit 'Apply' and the prefab would be restored. Now this is no longer the case; if we disconnect the prefab, it's forever disconnected

    So our artist is constantly trying out different things and trying to add sub-prefabs to these rooms. Before, we could just drag prefabs into the room hierarchy at any point, and things would be fine. Now, we have to
    1. Enter prefab mode
    2. Reposition the camera because it's no longer where it was
    3. Make the changes
    4. Save - which sometimes breaks
    5. Go back into scene mode
    6. Repeat ad infinitum
    I'll see if we can get a video made, but really the thing is - if we can go into prefab mode and add / reorder children of that prefab anywhere inside that prefab and have the changes apply, we should be able to do so in scene mode as well

    I think we'd even be cool with this being an option we have to enable in the editor, and I'm even cool with this being a limitation that applies only to non nested prefabs

    We use a lot of transforms to organize our rooms so just adding the sub prefab to the end of the list is not enough

    Let me know if you'd like further clarification!
     
    Last edited: Aug 22, 2019
    jimmyjamesbond and KB73 like this.
  11. aeldred28

    aeldred28

    Joined:
    Dec 16, 2017
    Posts:
    30
    No operation should ever take more than one click for an artist decorating in Unity.

    and this new workflow takes many.

    So I would be working on an environment with many prefabs, and I would be using overrides to tweak some lights, but all the sudden I make the mistake of thinking I can tweak a component on a child object while I’m in the flow — Unity tells me I cannot do this and forces me into prefab mode. My camera is now in the ether some place far away, and any other prefabs I had in the scene that I was using as a comparison reference are now gone. I have to work my camera back to where I was before, and then I have to make my change and hit the save button. It is quite easy to take stock of how many unintuitive operations that requires as opposed to the old system which only ever required one click to do anything at all (Hit Apply).

    Now this may not seem like a big deal — which is why I gather many people on this forum have a hard time understanding artist’s gripes with the new workflow. But the consequences of this unintuitive workflow stack up when you are working for 5-10 hours at a time in engine.

    For myself, when I’m working, I basically have to force myself to go against a natural prefab editing flow. Nothing is more irritating than wanting to get a quick tweak into a prefab and having something get in the way like a popup. It makes it unbearable after a while, even if it is just a few clicks extra compared to the old way.

    That’s how I feel about the new system anyhow. I wish I could chalk it up to not being adjusted to the “new way”, but it feels like more than that.
     
  12. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,892
    Thanks for elaborating!

    First of all, we should probably talk about what this is:

    > Save - which sometimes breaks

    What breaks here, which doesn't break when applying on a Prefab instance?

    I'll ignore this in the discussion on workflows below, as it seems like a separate issue on its own.

    Anyway, the workflow in the In-Context Editing branch would be:
    1. Enter prefab mode (in-context editing - camera remains where it is)
    2. Make the changes
    3. Go back into scene mode (click yes to save changes)
    4. Repeat ad infinitum
    Compare with the old workflow:
    1. Make first change (click yes to break the Prefab connection)
    2. Make remaining changes
    3. Click Apply
    4. Repeat ad infinitum
    These seem pretty equivalent to me. It's not clear here what is slower than in the old approach. Again, if you could record videos showing what it is that's slow in the In-Context Editing preview build, we'd love to see it to better understand.

    It just isn't that simple, as the objects of a Prefab instance is a completely different thing than the objects of a Prefab Asset.

    Yes, we'd love the clarification of what it is that's slow in the In-Context Editing preview build. :)
     
  13. greengremline

    greengremline

    Joined:
    Sep 16, 2015
    Posts:
    183
    Leaving aside the fact that you can't reorder children at all in this new workflow without going into prefab mode...

    The problem is that you have to do this new workflow at each level of prefab. And this doesn't work for multiple prefabs at once. So you get multiple additional steps per prefab. Before, you could just reorder everything in the same scene, with the same settings, and click apply a few times (or even automate that if you're good at scripting).

    Now, these additional steps add up. Sure, they might seem trivial when you're only editing a single prefab. But it's UX 101 to know that each additional step adds time & cognitive load especially when applied over 5-6 hours of work.

    Also, you don't have to apply your changes until you're done in the old workflow. So you could reorder as much as you wanted, and then at the end, apply it all at once. Now, you have to go into prefab mode, reorder, apply, go out, go back in to make further changes, etc, etc

    So it's not a 1 to 1 comparison at all

    I'm interested to see how we'll be able to edit multiple prefabs at once in this new In-Context Editing workflow, as well as easily reorder prefab children without going into prefab mode like we could in the old workflow
     
    Last edited: Aug 28, 2019
    Lars-Steenhoff likes this.
  14. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,892
    Okay, so when editing a single Prefab, the amount of steps is equivalent, but the issue is when wanting to edit multiple Prefabs at once, or wanting to edit a Prefab in multiple rounds.

    You won't.

    Thanks for the feedback. We'll continue to think about ways we might be able to address these use cases.
     
  15. kickasslin

    kickasslin

    Joined:
    May 31, 2023
    Posts:
    3
    I found having goto Prefab mode really annoying ,too. I almost never need nested prefab.And need to reorder nodes in hierarchy very often . Prompting me to go to Prefab mode is really a waste of time ,Please give us an option to restructure prefab freely like we did in older version ,if anything breaks , then break it .