Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Undo history and saving

Discussion in 'Improved Prefabs' started by plindberg, Jun 20, 2018.

  1. plindberg

    plindberg

    Joined:
    Nov 25, 2016
    Posts:
    16
    First of all, first impressions with the prefab system: Awesome! Great job.

    After fiddling around a bit in the beta build i noticed that you cannot undo a change that was made to a prefab inside of edit mode if you have exited edit mode. I think it would be great if you could, and it will probably prevent many time-consuming mistakes from happening, especially considering the auto-save option.

    Also, since you don't see the prefab in it's 'natural environment', so to speak, it can be hard to know if the changes you've made are the changes you want to save. Perhaps add a way to 'preview' the changes by displaying the prefab in the scene from which you came (before you have to save).

    Thanks!
     
    Deeeds and cirocontinisio like this.
  2. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    7,074
    When you change a prefab, and have the auto update selected, the changes are seen in the scene. You can undo if it isn’t right.
     
    cirocontinisio likes this.
  3. plindberg

    plindberg

    Joined:
    Nov 25, 2016
    Posts:
    16
    Only in the prefab edit scene. You can't undo after exiting that.
     
    Deeeds likes this.
  4. plindberg

    plindberg

    Joined:
    Nov 25, 2016
    Posts:
    16
    Bumping this because I think it's a significant issue. It's seriously unintuitive that you can not undo the changes after you have exited prefab mode. I am certain this will cause time-consuming issues, especially when less technical minded people go in and experiment with a prefab, because it is not obvious that leaving prefab mode is an irreversible action. It used to be obvious before, when you had to press a very explicit "Apply" button, but it is not now.
     
    Ethan_VisualVocal and Deeeds like this.
  5. Schmunkee

    Schmunkee

    Unity Technologies

    Joined:
    Sep 4, 2013
    Posts:
    1
    Hey, thanks for bringing this up.

    Currently, there are issues with letting the undo stack be Prefab Mode-Scene agnostic. Mainly the fact that you could potentially undo things without noticing that you undo them. Say, you're in Prefab Mode and you accidentally undo some changes you made in a Scene before entering Prefab Mode.

    That said, we agree that the current undo implementation isn't ideal either.
     
    plindberg likes this.
  6. M_R

    M_R

    Joined:
    Apr 15, 2015
    Posts:
    148
    what about:
    - if you exit prefab mode and undo, it undoes whatever you did since entering prefab mode, as if it were a single action
    or:
    - entering/exiting prefab mode are undoable actions themselves (like changing selection), so: enter prefab mode -> undo -> you are in the scene: exit prefab mode -> undo -> return to prefab mode -> you can undo things done in it
     
    dadude123 likes this.
  7. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    427
    This. 1000x this!

    There's an example in symbols within all good design software, too. That does either this, or steps back in this manner without reopening the symbol editing mode.

    @Schmunkee As to this fear:

    "Mainly the fact that you could potentially undo things without noticing that you undo them."

    The easiest (and possibly the best) way around this is to zoom the Scene view to the object that's having the current Undo operation applied to it. ie. coded use of the "F" key shortcut, on Undo activation, along with scrolling of the Hierarchy to the selected object upon which this occurring, and Shift+Command+Z for Redo, so the user can cycle between them, to see what's being redone and undone.

    When someone needs Undo, they need it. Really need it! Please make it work well.
     
  8. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    223
    @M_R

    It is exactly one of those two solutions we are considering, but leaning heavily against solution 1 where every thing you did in prefab mode is undone, without entering Prefab Mode.

    Entering Prefab Mode while undoing feels wrong in my opinion, and that is only my opinion, but it also has a few harder to solve issues like instance ids changing on every entry into Prefab Mode which makes the undo operations invalid, certainly solvable, but the first solution is simpler to implement.
     
  9. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    3,082
    I prefer undoing enter/exit prefab mode over undoing the things you did in prefab mode in one go, for several reasons:

    - You lose the ability to undo parts of your prefab edit. If the prefab edit took a while, then you have to redo all the work if you undo, even if you only needed to undo the very last operation. You essentially discard the entire undo stack of the prefab changing when you leave prefab mode, which is pretty destructive.

    - If the prefab edit was quite a few operations ago, and you want to undo a bunch of things in a row, you might hit undo several times, and miss that one of them undid a prefab modification.

    - It teaches people what undo does in the context of the new prefab workflow. Undoing everything in one go could be confusing, as you won't necessarily notice what happened.
     
    dadude123, plindberg and Deeeds like this.
  10. plindberg

    plindberg

    Joined:
    Nov 25, 2016
    Posts:
    16
    I agree with the previous poster, I think stepping back into/out of prefab mode is the most practical solution.
     
    dadude123 likes this.
  11. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    638
    There's undoing everything in one go seems really problematic.

    Undo/Redo always has fine granularity, so suddenly changing it to "undo everything in a huge batch" is definitely a deviation from how things are working right now.

    There are quite a few applications that have the same problem, and in all of the ones I know solve this by treading a mode/context change as undoable action.
    Unity already treats selection as an undoable event, which makes makes sense.