Search Unity

Preview build with limited Prefab Asset editing from Project browser

Discussion in 'Prefabs' started by runevision, Mar 7, 2019.

  1. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,636
    Update April 23 2019:
    As some of you have noticed, Prefab Asset editing from Project view has been released in 2019.1!

    Update July 10 2019:
    For 2018.4 release management wants to gain extra confidence in the stability of the feature. See this thread, try out the preview build there, and give us your feedback to help us assess the stability.

    Original message below.


    For the past months we’ve been working on making it possible to edit the root GameObject of a Prefab Asset in the Inspector directly from the Project browser without going into Prefab Mode.

    We’d love if you could try out this preview build and let us know if it’s working out for you and solving (some of) the problems you’ve had. It’s based on Unity 2018.3.7f1.

    Download build here

    Note: The Download page has a link to the Linux Editor but this is not available.

    At an earlier point in the development of the new Prefabs system for 2018.3 we thought this type of asset editing would not be viable, due to the nature of Prefabs now being imported objects rather than native assets, but we eventually found out that there is a way, as long as we impose certain limitations and fixed a lot of edge cases. So that’s what we’ve been doing!

    When using the asset editing functionality, changes are always saved immediately, similar to when Auto Save is enabled in Prefab Mode. This was one of the necessary limitations. The internal methods for adding and removing components, and for undo, also save and import automatically when changing Prefab Asset objects, and this is necessary to keep that way in order for internal state to remain consistent.

    What is possible with asset editing:
    • Editing the root GameObject and its components.
    • Adding and removing components on the root GameObject.
    • Multi-selection of multiple Prefabs and editing common components on their root GameObjects.
    • Seeing changes reflected in the open scene immediately (though it will be slow for Prefabs that are large and/or are used many places).
    What is not possible without opening Prefab Mode:
    • Editing anything else than the root GameObject and its components.
    • Applying changes from a Prefab Variant to its base.
    • Edit changes without Auto Save behavior.
    Inspector.png
     
    Last edited: Jul 10, 2019
  2. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,627
    Looking very sexy, hope this will satisfy people's needs. Trust it wasn't too much stress to implement (it was, wasn't it?)

    [edit] I read more carefully...!
     
  3. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    823
    Awesome!!!! This is honestly so amazing!!! I feel like this is the biggest hole in the new workflow ☺️ thank you so much for this!

    One question - would it be possible to have auto save by default (checkbox), but if disabled it shows "cancel" and "apply" buttons like other inported assets?

    Just a thought, since I know auto save results in a little lag ☺️ this way people can decide which one they like the most. Totally understandable if this isn't possible, of course!
     
  4. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,636
    No, that's exactly the point. If it was possible to delay the save we'd have added support for that, but we couldn't find a way to make it feasible. We know that's not ideal; that's why we explicitly wrote a paragraph about this limitation.
     
    joshcamas likes this.
  5. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    823
    Ahh okay :) Sounds good then!
     
  6. TX128

    TX128

    Joined:
    Aug 22, 2018
    Posts:
    25
    Is that build stable enough to deploy on production PCs? Is there any problem if we override default editor?
     
    jrumps likes this.
  7. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    443
    Most assets in Unity are imported assets, meaning they have to go through some kind of processing before Unity can use them, e.g. FBX models are converted to internal mesh format, textures are processed, audio files are converted and so on. There are a few assets that are native to Unity and does not require processing these are Materials and ScriptableObject and a few more.

    Common for imported assets is that once imported you can't modify them without going through the processing steps again.

    Prefabs used to be native assets, but in order to implement nesting we needed to start processing them so now they are imported assets. This means that every time you change a prefab asset on disk we need to do processing and due to nesting and variants there might a lot a prefabs that needs processing when you change a single prefab.

    So when you are editing the root GameObject in the project browser you are actually editing the imported and processed objects, which means they get out of sync with the source asset in the Assets folder. This is very dangerous and can cause dataloss unless we always make sure to update the source asset when ever you modify the imported assets. This is one reason that auto save is always enabled when editing the prefab in the project browser.
     
    Novack, Stexe and jrumps like this.
  8. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,636
    Well, it's a preview build. It passes all our automated tests of course and we (developers and QA in our team) didn't find any issues, but it hasn't been through a regular alpha and beta phase, so who can really say? Handle responsibly as always. Use backups or version control.
    Not clear what you mean here. Are you referring to an editor of a specific component type?
    If you mean overriding the default PrefabImporterEditor, then this could have undefined effects, as the new solution also relies on the PrefabImporterEditor.
     
    TX128 likes this.
  9. TX128

    TX128

    Joined:
    Aug 22, 2018
    Posts:
    25
    If there are no problems with the build, will this be merged on 2019.1 or 2018.3?

    Edit: Yeah, I meant the PrefabImporterEditor. Thanks for the response :)
     
  10. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    847
    I really wasn't expecting this to happen, to the point that was about to actively look for some way to customize all that space left blank right under the "Open Prefab" button.

    Definitely it's going to create mixed feelings as for any "corner case" preference about the UI.

    1) What if this "Module" under the Open Prefab button was actually a Package in the Package Manager, so that you wouldn't need to fork a beta, while still offering everyone the chance to test it on any present or future builds as an independent feature?
    I can see a lot of people complaining about it being more or less intuitive depending on their level of experience.
    "because there's one more thing to keep in mind".
    So making it optional sort of makes sense (to me that I'm outside that black box, at least?)

    2) Would it be possible to implement it as a Package, thus importing a native implementation for a generic "UnderOpenPrefabEditor" class, which could also be extended in other ways (eg: Asset Store assets for customizing the Open Prefab tab) by other tools?
    EDIT: I'm probably speaking about the PrefabImporterEditor as well, which makes me assume a "maybe" could be the answer.

    Even totally discarding the idea about implementing this (and I hope this is not going to happen), it would be a definite pity to leave all that unused space, to the point of making the "Open Prefab" button feel like out of place in that particular position.
    I believe the contents of the root prefabs should be shown at least in read only mode, possibly requiring an extra big, bold, red "Edit Root" button right below the "Open Prefab" one, just to make it evident for starters that it's NOT a common editing operation. Something similar to what is implemented for Mixers for Runtime Editing.
    Maybe dropping this after users get accustomed to that, or from the Preferences.

    I know it's an extra layer and I have no clue about the implications it may have, or even if it's technically feasible, but felt like sharing the idea, you never know.

    3) (a bit OT: I was wondering: if it is still possible to break a project by leaving its nested assets out of sync if a crash/power off happens in the middle of a chain of nested prefab updates, an operation which appears to be somehow time/processor consuming?)

    4) Are there any relevant performance losses (both at edit time/play time/final build) when using this new interface we're so happy to see implemented (I can't exclude that making this possible didn't require any extra checks or processing even at runtime)?

    Looking forward to test it asap, and getting back to you if something goes wrong or have any relevant feedback to share :)
     
    Last edited: Mar 8, 2019
    Stexe likes this.
  11. hawken

    hawken

    Joined:
    Aug 22, 2013
    Posts:
    480
    Opening a prefab gives you greater granularity of nested elements without dragging the prefab into the scene, exposing the root properties gives you quick access to the main settings that may be driving your prefab, which was handy in the old system.

    I do agree that without an "apply" button you are going to have to be mindful of the changes you make, but this is also the case for Materials, that also autosave, which we are all used to.
     
  12. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,869
    I like this new idea of exposing only attached components of the root prefab. The prefab don't need to be opened if you are not changing/moving any child on it.
     
  13. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,636
    No, it touches code in core Unity that can't be changed from a package.

    Nothing changes for builds at all. Play Mode also shouldn't be affected by this. What could be affected is selecting Prefabs in the Project Browser, since this has to do work it didn't before.

    Looking forward to it!
     
    NeatWolf likes this.
  14. Rich_A

    Rich_A

    Joined:
    Nov 22, 2016
    Posts:
    174
    The squeaky wheel gets the grease. Thanks for the grease.

    Thanks for previewing it with us and presumably integrating the feedback from here as well. Good way of operating.
     
    Last edited: Mar 12, 2019
  15. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    413
    Works really great, the only feedback i have is to remove the "Open prefab for full editing support" help box. This takes up quite a lot of space, and i'd rather have this used up with information about the components. Maybe have the text of the button convey this information?
     
    Sinterklaas, tatoforever and Rich_A like this.
  16. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    299
    Really happy that this is now a reality. Could we get a little more of a UI distinction other than just plain text and a warning sign? I made a mockup of what I'd personally love to see, as I know that I would most likely start editing stuff and later realize that I was editing the prefab instead of the scene object even with the existing warnings.

    mock.png
     
    NeatWolf and Rich_A like this.
  17. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,869
    I've already posted and like this new idea, however after playing a bit more with I'm like the other guys. I feel like the new Prefab UI root inspector takes way too much space. Here is what I suggest:

    Instead of this (which eats lot of vertical space):
    upload_2019-3-12_17-28-47.png

    I suggest this:
    upload_2019-3-12_17-35-45.png

    I edited the second image on Ms Paint to illustrate my idea so please bare with me. In other words, reduce the large empty wasted space at the top while retaining Prefab Root idea and the information to open the Prefab for full editing.
     
    Last edited: Mar 12, 2019
    Stexe, SirIntruder, NeatWolf and 3 others like this.
  18. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    413
    We're already used to an open button when selecting a prefab in the scene view, why not just have it exactly the same in both scenarios?

    upload_2019-3-13_17-58-33.png
     
    Stexe, SirIntruder, TX128 and 4 others like this.
  19. Laurens-Paladin-Studios

    Laurens-Paladin-Studios

    Joined:
    Apr 25, 2015
    Posts:
    49
    Also, this is great!

    upload_2019-3-18_11-8-6.png
     
  20. paulrts

    paulrts

    Joined:
    Jan 4, 2018
    Posts:
    12
    This works great, thanks!

    Will this functionality going to make into a 2018.3 release build at some point?
     
  21. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    522
    Fantastic. I can actually try out a nested-prefabs version of the engine without it wasting tons of my time due to my current game's production workflow (I regularly change hundreds of prefabs root properties back and forth. Having to open then is incredibly onerous).

    Is there any chance at all for 1-leaf-down or 'invisible child select' legacy behavior in the future?
     
    Stexe and KB73 like this.
  22. XI1stIX

    XI1stIX

    Joined:
    Jan 30, 2017
    Posts:
    2
    Oh thank the lord baby Jesus I was ready to drop Unity on its head after this dumb prefab update made the workflow so slow.
     
  23. VCTR13

    VCTR13

    Joined:
    Mar 1, 2019
    Posts:
    2
    Hello. Just starting to learn Unity. I want to create a Prifab, but there is no such item. Can you tell me how to solve this problem?
    upload_2019-3-29_14-14-55.png
     
  24. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    443
  25. VCTR13

    VCTR13

    Joined:
    Mar 1, 2019
    Posts:
    2
  26. SirIntruder

    SirIntruder

    Joined:
    Aug 16, 2013
    Posts:
    33
    Works great! Will this land in official 2018.3/4 soon?
     
  27. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,636
    The work itself is done and we're in the process of trying to make sure it can ship in 2018.3.
     
    Stexe, CDF and SirIntruder like this.
  28. jimmyjamesbond

    jimmyjamesbond

    Joined:
    Mar 17, 2015
    Posts:
    15
    Any plan to be able to edit the children of a GameObject in the Project Browser? I have tools that play a complete set of effects (animation, particles, lights, postfx etc) and do most of my tuning in the project browser. Each effect can have multiple child systems that I can tune and play all together. Having to edit that prefab in a mode and then apply it each time I want to play everything at once breaks this workflow. I can't think of a way I can live edit with this new system like I was previously able to do.
     
  29. slime73

    slime73

    Joined:
    May 14, 2017
    Posts:
    32
    My team is pretty interested in this feature going into 2018.3. Is there any update or ETA on that happening?
     
    Lars-Steenhoff likes this.
  30. TX128

    TX128

    Joined:
    Aug 22, 2018
    Posts:
    25
    This has been added to 2019.1, is that right?
     
  31. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    395
    Yes it is :)
     
  32. KB73

    KB73

    Joined:
    Feb 7, 2013
    Posts:
    185
    Is there an ability to see if a prefab has any child nodes in the project view? We have 100s of prefabs and cannot tell if they have children or not without opening them in the hierarchy...
    The documentation online seems out of date re: icons etc...

    Is there a roadmap of potential fixes or new features/tweaks to be reviewed for the prefab system?

    thnx
     
    Last edited: Apr 17, 2019
  33. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,636
    As some of you have noticed, Prefab Asset editing from Project view has been released in 2019.1!

    For 2018.3 / 2018.4 release management ultimately wasn’t comfortable with this large a change so the feature won’t land there. We know how many of you have asked for this to be in 2018.3 but it looks like there is nothing that can be done about it. We hope you’ll enjoy the feature once you’re able to move to a version of Unity that has it.
     
    Jes28 and optimise like this.
  34. kvfreedom

    kvfreedom

    Joined:
    Mar 30, 2015
    Posts:
    16
    It's terrible.
     
  35. zornor90

    zornor90

    Joined:
    Sep 16, 2015
    Posts:
    169
    Seems kind of unfortunate to force people onto a LTS branch with a core part of the engine drastically changed while also not offering them full functionality, unless they upgrade to an unstable branch (don't get me started on how texture streaming was broken for 10 versions of 2018.2 causing my game to get some bad reviews). It'd be different if this had been done as an optional package; instead, people are going to be forced to choose between stability (?) and half baked features, or instability and maybe complete features - and this doesn't even begin to cover things like assets on the store depending on prefabs, are they going to eventually work on 2018.4 or are the users going to have to be told to suck it up and either upgrade or ask for refunds?

    Don't get me wrong I love the new prefab system, I just feel like the decisions made management-wise are leaving a lot of people in a bind - an LTS version of software shouldn't have half-baked features in it, in my opinion.
     
    Stexe and Yozaro like this.
  36. slime73

    slime73

    Joined:
    May 14, 2017
    Posts:
    32
    Agreed 100%. 2018.3/4 LTS currently has a huge workflow regression compared to both older and newer versions of Unity, which makes it much less useful as a LTS release than it otherwise would be.
     
  37. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    4,285
    Any chance to get anyone from release management into this thread? Not blaming you guys on the prefab team for this one, but release management is in the wrong here.

    In my opinion, they kinda dropped the ball on letting the new prefabs into 2018.3 in the first place, but there's nothing to do about that now; this really isn't the time to back out of that decision by letting the new prefabs be in a half-finished state in LTS. Since they're in 2018, they should be in 2018 properly.

    To a bunch of people, this is a bad workflow regression, and it's also going to push asset authors (both externally and I imagine internally in Unity) away from the LTS and onto 2019, which is a bad deal for everyone.
     
    Peter77, Stexe, thibouf and 1 other person like this.
  38. TX128

    TX128

    Joined:
    Aug 22, 2018
    Posts:
    25
    As someone who can't upgrade to 2019.1 because for whatever reason our game shaders break this is very unfortunate.

    We can't have this 'feature' that was taken away from us on a LTS of the year it was taken away from. Honestly, this LTS doesn't look as interesting anymore.
     
  39. P-Jawahar

    P-Jawahar

    Release Manager Unity Technologies

    Joined:
    May 15, 2014
    Posts:
    225
    We had an internal meeting this morning and we are working on a solution for getting this feature on to 2018-LTS. Current thinking is that it is going to be on a custom branch closely shadowing 2018-LTS and once it is matured, this branch will be merged back to the mainline 2018-LTS. Will add more detailed information once we have the plan in place. It should happen soon after 2018.4.0 goes live - i.e in a week or two.
     
    joshcamas, Ferazel, Yozaro and 10 others like this.
  40. Stexe

    Stexe

    Joined:
    Feb 2, 2014
    Posts:
    72
    Seconding the requests here. Really hoping that you can get it into 2018.4 as it is one of the last things I'd love to see implemented to make the workflow better. Seems weird to implement new prefabs and not finish some of the most basic and requested things when it is available in 2019 and possible to include in 2018.4 with a bit of testing. Here's to hoping you do include it. =)
     
  41. Stexe

    Stexe

    Joined:
    Feb 2, 2014
    Posts:
    72
    Any update on this? It is really the #1 thing I'd love to see in 2018.4 besides just bug fixing. Using the new prefabs is great minus lacking the ability to see the values in the inspector. Even if the values were locked, just being able to see them would be enough.
     
    joshcamas, KB73 and thibouf like this.
  42. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,221
    Will I be able to perform this intuitive action without needing to open the Prefab Window ( and consequently lose connection to the scene hierarchy )?

    ModifyNestedHierarchy.gif
     
    Yozaro and Stexe like this.
  43. Stexe

    Stexe

    Joined:
    Feb 2, 2014
    Posts:
    72
    That and inspecting / modifying prefabs without opening them are the two things I'd love to have in 2018.4 LTS. Right now it is a huge workflow killer and I don't want to update to 2019 and risk breaking so many other things we have.
     
  44. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    823
    It's incredibly awkward especially with UI, since hierarchy actually matters... meaning prefabs are sometimes impossible to use since it would mean you can't change the hierarchy aka move stuff behind other stuff. oof
     
  45. Stexe

    Stexe

    Joined:
    Feb 2, 2014
    Posts:
    72
  46. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,636
    joshcamas, Stexe and mh114 like this.