Search Unity

About the new prefab workflow ...

Discussion in 'Prefabs' started by laurentlavigne, Jun 21, 2018.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,335
    1. nest prefabs work well and seem to update quickly, great!
    2. The new override menu is great and could be improved further by adding the number of overrides (5), also gray it out when there is nothing overriden.
    3. the blue indicator of override barely reads on the light gray interface.
    4. Say I want to move a GO from one prefab to another. Can't do that anymore. This seems like an artificial limitation since it is possible to parent a GO to a prefab from within the hierarchy.
    5. Love the prefab mode but as was stated in other threads, we lose all sense of scale, relative color and ability to use scene objects to restructure the prefab so this is a regression.
    6. I have 5 levels of rocks, I need to change the physics of all of them, I'd normally multi select in the project view and modify that variable in the inspector. Regression. FAQ states that it's no longer possible due to prefabs being imported assets, I've seen very advanced custom inspectors that can edit imported assets so this should be possible.
    7. Out of these rocks I want to plant the one that has more than 100 resources, I would scrub through them with the arrow key, which is at most 5 keypress and a click drag. Now it's 10 clicks, 5 context change, one click drag. Regression. Same as above, probably easier as all we need is a read only display of the attached components.
    8. icons, icons everywhere. This looks like the first step in an evolution of the hierarchy view so I'm willing to wait. I like less icons because then name become central, and icons are added by custom inspectors.
     
    Seb-1814 and Deeeds like this.
  2. cirocontinisio

    cirocontinisio

    Joined:
    Jun 20, 2016
    Posts:
    884
    Some good suggestions and comments! I'll answer what I can:

    That's in line with what was happening before, right? You can't remove a child GO from a Prefab today, Unity warns you that the operation would break the Prefab link.

    In the new workflow, you could do this by selecting "Unpack Prefab" on the instance you want to break, and then you're free to remove objects at will. But losing the connection is needed.

    You can use Editing Environments to achieve some of that. I explain them here.

    Very true. I also raised it with the team, and they're thinking about how to solve it in an elegant way. As a workaround, you might find interesting the idea of using a base Prefab as an archetype of a type of object, and having Variants derive from it to represent similar objects. Then you can make your changes from one centralised point. I show it here.
    But yeah, good spot. I agree we need to bring back that functionality somehow.

    I would hold off on this one. In this new workflow, expect to see plenty more Prefabs, and a lot of nesting of both Prefabs into GameObjects and viceversa. I think the icons provide a clear indicator of what is what, and the benefit overweights the added visual noise.
     
  3. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    If my vote counts for anything, and I realise it probably doesn't, I'd be happiest with simple, unique text colourings of the different types of prefabs and levels of prefabs. Customisation of this would be even nicer.

    As OP said... leave the right gutter for custom inspectors and custom inspector settings. Or, at the very least, let us switch from icons to coloured text differentiation for prefabs, nested prefabs and variants.


    -------------------------

    Editing Environments --- SURFACE THIS HARDER!

    And, A UX suggestion: Let us drag a Scene into the Prefab Editor 'Scene', and have it instantly load, that way we can instantly see the prefab in multiple different contexts, easily. In the top bar of the Prefab Scene Editor, have an option to set the current scene as the default scene for the editor, if it's not already.

    This seems so logical I'm amazed it wasn't done. Hiding the setting away in preferences seems asinine, remote and unnecessarily memory and labour intensive to the point of being burdensome.
     
    Seb-1814, laurentlavigne and JesOb like this.
  4. Sebioff

    Sebioff

    Joined:
    Dec 22, 2013
    Posts:
    218
    This is good, but there needs to be more than one possible scene and a quick way to switch between them. Not only for checking 3D assets in different environments, but for UI it is absolutely required - for example in our case we got 4-5 different UI canvases with different scale settings and render modes (some 2D, some 3D world space) and the UI prefabs are built to go onto a specific canvas. They can't just go onto any canvas since due to how the UI system works they would look and behave differently.
     
  5. cirocontinisio

    cirocontinisio

    Joined:
    Jun 20, 2016
    Posts:
    884
    Yeah, of course. The team is investigating a way to provide that choice in a good way, and where to store the preference per-Prefab without actually changing the Prefab itself nor its meta file. Basically undoing their asinine work ;)

    I want to bounce a couple of ideas/comments around:
    - Providing the option to drag and drop a scene in the Scene View to choose an Editing Environment sounds more cumbersome than having it in the Editor Settings. It would require you to navigate to the Scene folder each time you want to change it, or have Scenes starred in the Favourites or some other way, but it's a lot of clicks.
    - Providing a dropdown in Prefab Mode sounds interesting. But what scenes appear in the dropdown? Having just ALL scenes from your project is unmanageable for any project (imagine a 20+ scenes dropdown). Maybe picking from an Array of scenes that you still edit in the Editor Project Settings?
    - As a solution, you can lock an Inspector on the Editor Project Settings and dock it anywhere, and make it very small. It can be as small as this:


    and it doesn't look too bad to me.
     
  6. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    Most designers work in a two column layout of the project view, meaning the highest level scene folder is only ever one click away.

    To then drag a scene, if its in the top level, into the Prefab Editor, is a single extra click and drag, and there's a good chance they either work with the Prefab Editor in close proximity to the Project pane, or they can work that way.

    This process never drops any active selection of anything else currently selected in the inspector, which is something crucial to consider, because the user doesn't need to recalibrate to their workflow by finding and re-selecting whatever they desired to work on from the hierarchy.

    Yes, I know you can lock inspectors, and open multiple inspectors, but that's more clicks and more panel management.

    ---------------
    Your process, as it is at the moment:
    Opening the Edit settings is:

    Top left, click on Edit, mouse down to Project Settings,
    Wait for pop-out, mouse down to Editor, Click it.
    Now wait for Editor to take over control of the Inspector panel.

    Now we have to go to the Scene folder and find that scene, so the first steps in the above example start being true of this process, too. Find a scene, and drag it to a TINY slot, as opposed to just dragging into a massive Prefect Editor without any concern for accuracy. And there's a wrong slot right next to the right slot, too. So requires more accuracy and focus, by an order of magnitude.

    Now the user must go back to their hierarchy, rediscover and reselect whatever level of their Prefab they wanted to work on.

    That is a burdensome workload. Hateful, in fact.

    --------------------

    As an experiment, try dragging a Scene into the Prefab Editor window. You'll be asked if you want to merge it with the current scene, which isn't really a scene, but will be destructive to the user's existing scene.

    This needs to be fixed. While your'e there, just swap the behaviour from merge to load. Call it a day.

    The biggest plus of this approach, it's logical. This is what anyone thinking "I wonder if I can drop this scene into the background of the Prefab Editor?" is going to be thinking would be the way to do it.

    As I said the first time... it's so logical it's boggling it wasn't done already.
     
    StunAustralia, Seb-1814 and rakkarage like this.
  7. Sebioff

    Sebioff

    Joined:
    Dec 22, 2013
    Posts:
    218
    Array of scenes in the settings + dropdown in prefab mode sounds best to me personally (+ some "link" to the settings in prefab mode for discoverability). Allows you to select which scenes should show up there and you can also determine the order yourself. Seems the most comfortable way once it is set up, and you're not going to want to change the scenes list all that often so the couple extra clicks there don't matter.

    Locked inspector to project settings is an ok temporary workaround until something better is implemented, but not a good final solution.

    Drag + drop would be a nice bonus as an additional way (if you ever have the need to just quickly check in a certain scene once or just so it works in case you try), but would be annoying as the only way in a big project. Too many clicks and there's no quick way to navigate back to where you were in the Project explorer currently so you lose your focus.
    Also I'm not so sure if I would have intuitively tried to drag + drop a scene into the prefab editor without knowing beforehand that this is something you can do - not quite as logical to me as it is to Deeeds :) Intuitively I would have expected that to end prefab mode and open the scene.
     
    Last edited: Jun 22, 2018
    Ofx360 likes this.
  8. Ofx360

    Ofx360

    Joined:
    Apr 30, 2013
    Posts:
    155
    Im not sure if we’re talking about current solutions or future solutions, but i think having an array of regular environments would be nice. That could then appear im a dropdown on the prefab editor.

    I think that’d cover most people’s needs

    Edit: exactly what Sebioff said!
     
    Stardog likes this.
  9. cirocontinisio

    cirocontinisio

    Joined:
    Jun 20, 2016
    Posts:
    884
    I personally think drag and drop easily becomes a problem in big projects (even in two-column Project window, sorry @Deeeds) and it clashes with the dropdown concept (what happens if you drag a scene that's not in the list?).

    By the way, I want to specify that I was just participating in a collective brainstorming, there's nothing planning for now. Just my ideas (based on people's suggestions).
     
  10. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,335
    Great brainstorming.
    Before, it would warn us that the link will break, OK means we agree, break the prefab and reparent. Now it warns us and no option to break. Big difference.
    Unpack Prefab is not elegant, it should be an option like break prefab link but not necessary for this sort of work.

    Too many steps, let's simplify:
    Environments are useful when there is no scene loaded and edit prefab is called from the project view.
    If a scene is loaded then in 90% of cases we want to edit the prefab in the scene like in that presentation Nicholas made 300 years ago. In this case the scene needs to be white out, so we know that scene objects are out of reach.

    I don't understand what would be inelegant in showing us the root components in the inspector like it's always been, can you explain?
     
  11. print_helloworld

    print_helloworld

    Joined:
    Nov 14, 2016
    Posts:
    231
    You don't need to recreate the existing inspector drawer for the prefabs, you could at least do something like this:
    Code (CSharp):
    1. foreach(var component in components)
    2. {
    3.     var fields = component.GetType().GetFields();
    4.     var serializedObject = new UnityEditor.SerializedObject(component);
    5.     foreach(var field in fields)
    6.     {
    7.         EditorGUILayout.PropertyField(serializedObject.FindProperty(field.Name));
    8.     }
    9. }
    Looks about right
     
    laurentlavigne likes this.
  12. Oshigawa

    Oshigawa

    Joined:
    Jan 26, 2016
    Posts:
    362
    +1, it seems counterintuitive to me to have to go to that new prefab window to see what are the children of the prefab.
     
    Deeeds likes this.
  13. Siccity

    Siccity

    Joined:
    Dec 7, 2013
    Posts:
    255
    Anyone found a solution? The new empty inspector is pretty pointless
     
    h54d and joshcamas like this.