Author Topic: Undo Problems  (Read 14035 times)

sunspider

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Undo Problems
« on: March 06, 2014, 04:19:17 PM »
I love all the crazy features in NGUI. However, I have found that when playing with them I often can't undo! This problem is especially notable with anchors. Often going from no anchors to having anchors and then undoing causes crazy movement of the GUI elements. Learning a feature-rich new software without being able to undo is quite difficult, just saying.
I assume these are known problems, but posting just to make sure and to open the door to discussion or if specific examples are needed. Or if anyone knows workarounds or has suggestions for how to avoid pitfalls.

Bernard Parsons

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: Undo Problems
« Reply #1 on: March 06, 2014, 04:59:54 PM »
Ya! I have the same problem. But it mostly happens when I change values, it doesn't seem to affect anything that is related to drop down features. I noticed this when I started making changes and when it didn't work I would try to undo everything. But it didn't put back the previous values, I could see though that it was back tracking everything I touched or clicked. I now remember not to save if I do this, or I revert to the previous save. Making more than one scene version of the same scene it usually what I do, just in case. But all in all, I really like NGUI. As a UI designer and integrator, this makes my job so much easier.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Undo Problems
« Reply #2 on: March 07, 2014, 08:47:43 AM »
Which particular actions fail to work correctly with Undo?

Bernard Parsons

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: Undo Problems
« Reply #3 on: March 07, 2014, 03:04:16 PM »
I just tried to recreate by massing around with the value and I can't seem to do it. Perhaps it's the long day working on UI that has gotten to me, but in the future if I do come across this issue I'll be sure to let you know. But right now it seems to work fine. Sorry for giving false info, but I was certain there were some undo issues.

sunspider

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Re: Undo Problems
« Reply #4 on: March 08, 2014, 01:07:39 AM »
My problems mostly consist of adding anchors, that is, going from none to having them... kept causing my controls to move to other places on the screen, then I'd hit undo and they'd move randomly again... not back to their original positions.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Undo Problems
« Reply #5 on: March 08, 2014, 01:07:52 PM »
And this is with the latest version? How can I reproduce it?

sunspider

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Re: Undo Problems
« Reply #6 on: March 10, 2014, 07:14:11 PM »
Attached is the exact simple control I'm using. Load your tabwindow example. Put this control under Content1. Add anchors. See it move and resize... Undo anchors. See it resize back but not move back into place.
This example seems like a small deal, but I have seen much larger changes (bigger moves) when I add anchor. This is the quick and dirty reproducible example I came up with.
Please let me know if this is fixable soon, or even if there's a quick diy fix we could put in before your next update. Our project has been trying to decide between NGUI and Daikon Forge, and the main reason we're leaning to df is the issue with undo...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Undo Problems
« Reply #7 on: March 10, 2014, 08:42:50 PM »
I'm not sure what version of Unity you were using, but 4.3.4 can't read that prefab.

sunspider

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Re: Undo Problems
« Reply #8 on: March 10, 2014, 09:08:54 PM »
Definitely strange. I am using 4.3.4f1
I'll try to recreate it using only your example controls...

sunspider

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Re: Undo Problems
« Reply #9 on: March 10, 2014, 09:24:51 PM »
Okay you can see the effect using just a plain Widget. Follow the instructions above... in your tabs example, put a widget into Content1. Stretch it so that it becomes the shape of a label... long horizontally and short vertically. Set anchors to unified. See shape change. Try to undo.

Having gone through this, i'm guessing that the problem is not with undo, but the unexpected shape change!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Undo Problems
« Reply #10 on: March 11, 2014, 06:02:49 PM »
Are you changing the scale of something? That would be the only reason I can think of that the shape would change on anchoring.

I just tried the following:

1. Example 13 - Tabs
2. Select Content 1.
3. ALT+SHIFT+W
4. Adjust the widget to be same dimensions as the label by dragging the blue handles.
5. Anchors - Unified. Shape remained the same.
6. CTRL+Z. Anchoring undone, shape remained the same.

Tried a couple other things, undo always worked properly.

sunspider

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Re: Undo Problems
« Reply #11 on: March 11, 2014, 09:03:20 PM »
That is exactly what I'm doing. I can make a video if you like. If so, let me know where to mail it.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Undo Problems
« Reply #12 on: March 11, 2014, 11:44:37 PM »
Is that with the latest NGUI? What's your OS?

sunspider

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Re: Undo Problems
« Reply #13 on: March 12, 2014, 01:09:32 AM »
windows 7, latest ngui.
Could it possibly have to do with the fact that I work in Standalone (1024x768 mode) in my Unity viewer?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Undo Problems
« Reply #14 on: March 12, 2014, 10:03:32 PM »
I always have my editor set to stand-alone build target when working with NGUI.

Unity 4.3.4, NGUI 3.5.4, Windows 8.1.

Make a vid if you can though, I am curious. Use the Edit -> Undo instead of CTRL+Z so I can see the effect in the video as well.