Author Topic: Nothing but problems with 3.0.0, also can't update  (Read 10898 times)

terravires

  • Guest
Nothing but problems with 3.0.0, also can't update
« on: October 04, 2013, 01:21:54 AM »
First,  I can't get an updated copy from Unity store.  Every time I hit "force re-download" and open the package it only contains 3.0.0.  This has been going on for several days now.  Store shows 3.0.1 in assets but I don't get that.

Second, I get nothing but problems with widgets changing their own depth and disappearing from my scene.

My Setup (from UI wizard)
UI Root (2D)
- Camera
   - Anchor (Center)
    - Panel1
      - UISprite depth 0 (somtimes -1)
      - UILabel  depth 1
      - SubPanel
        - Table
          - Sprite Depth 5   
          - Label depth 6
     - Panel2 (Dialog window gets toggled on/off via NGUITool.SetActive() )
       - Sprite depth 50
       - Label depth 51
   - HUD (empty game object)
       - Anchor TopLeft
          - Panel
             - Widgets depth 0-2
       - Anchor TopRight
         - Panel
           - Widgets depth 0-2
    -- etc

I've tried to normalize all my panels, using the bring to front and playing with values for hours.  My widgets will random disappear in the scene as windows are enabled.   Completely unrelated panels as well.  So toggle Panel2 and some (not all) of the widgets on Panel1 or maybe Panel5 will disappear.  What's worse, is in the editor everything appears normal.  Hit play and it all goes crazy.  Sometimes using a button in one panel will cause a different panel somewhere else on the screen to appear to change depth.  It's like something is always refactoring the depth and doing a horrible job of it. >:(

Second I get one thing sorted, something else appears to not render.  IE working on TOP LEFT and the bottom right will then start having Z level issues.  Note ALL objects are at scale of 1,1,1 and Z of 0. (per docs for 3.0.0)         

Nevulus

  • Guest
Re: Nothing but problems with 3.0.0, also can't update
« Reply #1 on: October 04, 2013, 01:52:50 AM »
If you bought NGUI from Asset store and its not downloading the correct version, then its an asset store problem.

You can try exiting Unity, go to your Unity downloaded purchases folder (it varies depending on your OS platform), and delete the version there. Then start up Unity in a new project and go to asset store and re-download from there. If it's still not downloading then it's a problem with the Unity asset store for sure.

Also when upgrading NGUI in a project that has NGUI already, I found its best to start a new scene, then delete the NGUI folder from prject, and download the package from asset store again. Never delete from your file explorer as you may corrupt meta data Unity uses.

Does the depth problem happen  if you load up one of the examples in a new unity project?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Nothing but problems with 3.0.0, also can't update
« Reply #2 on: October 04, 2013, 01:58:03 AM »
Well, first thing's first -- in order to get the latest version, you need to be logged in on the Asset Store. If you're not logged in, or if you're logged in with a different account that bought the kit, you won't be able to obtain the latest version.

Now onto the issues you're having... Nothing in NGUI 3.0 will change depth for you without your explicit actions. ALT+SHIFT+- and ALT+SHIFT+= keys will adjust it and normalize all widgets, for example. CTRL+= and CTRL+- will not, and neither will hitting "back" and "forward" buttons. Everything should remain consistent from edit mode to play mode, and nothing should randomly disappear. This is especially true for toggling panels -- turning on a panel shouldn't affect other panels. It will cause additional draw calls, and may even cause other panels to create extra draw calls, but that's all.

All I can suggest is pay close attention to the actions you're performing and let me know what they are in order for me to diagnose what issue you're running into.

terravires

  • Guest
Re: Nothing but problems with 3.0.0, also can't update
« Reply #3 on: October 04, 2013, 02:26:49 AM »
I am logged into the asset store.  And it DOES download... but each time the file only contains a 3.0.0.unitypackage version and the older 2.7.x which I don't import. 

I've tried to use all the NGUI functions via menus and keys to normalize and adjust.  They appear fine in the editor until I hit play.  Then as soon as another widget somewhere else changes, the draw depth of change on some other random one.

Example:

I have a button, no label but an extra sprite.

So
Button
- Background Sprite (-1)
- Foreground Sprite (0 or 1)

Button is clicked and using NGUI TweenPosition to activate a completely different object and panel.  This works, but then but sprite on the button on button clicked disappears.  Sometimes it's the background others it's the foreground.  Worse it can randomly cause something elsewhere on the screen to randomly change z-depth.  Or at least that's what it looks like to me as they disappear and backgrounds are drawn on top.  Sometimes in the editor I see the sprites drawn correctly but in game view via camera they all change.

I've restarted unity more than once, re-download (see previous issue) and re-imported.  Nothing seems to solve this behavior. 

Edit: I also completely and manually deleted %AppData%/Unity/Tasharen Entertainment/Editor ExtensionsGUI and redownloaded.  Same thing, only version 3.0.0. 
« Last Edit: October 04, 2013, 02:32:15 AM by terravires »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Nothing but problems with 3.0.0, also can't update
« Reply #4 on: October 04, 2013, 02:33:30 AM »
Have you tried simply selecting your panel and having a look at what draw calls are being created, and which widgets are causing them to be created? There is no magic there.

As for the asset store, as I mentioned, it's 100% caused by you either not being logged in with the right account, or not actually being logged in. Log out and log back in, navigate to the NGUI's page, and you should see the "download" button.

Importing it from the list of packages won't update it.

terravires

  • Guest
Re: Nothing but problems with 3.0.0, also can't update
« Reply #5 on: October 04, 2013, 02:44:07 AM »
Yes I have, there are tons of draw calls, 15-30 for each of my panels.  Not sure how or why those numbers are that high as there are not that many objects.

One example:

Panel has 32 draw calls (according to panel)
But it only has 8 objects (sprites/labels_.  All are on the same atlas but one, which says Font Material


I am logged in, and it does download a file.  It's that the download is always version 3.0.0.  I can delete the file and it downloads a new one but it's old.  I can go to the store page and hit the dropdown and say redownload.  It says import on the blue button.  I get no errors or warnings, just an out of date package.

Getting really frustrated with this.


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Nothing but problems with 3.0.0, also can't update
« Reply #6 on: October 04, 2013, 02:50:11 AM »
Yes, you have depth collisions happening with widgets in different panels sharing depth values, which is why the panels are forced to create that many draw calls. Did you watch the NGUI 3.0 video I posted a while back? One of the things I talk about there is how to debug and resolve your draw calls.

Simple fix: select one panel, ALT+SHIFT+=. Select another panel, ALT+SHIFT+=, etc. This forces all of the panel's widgets to be brought forward, one panel at a time. It also resolves depth issues by forcing that panel's widgets to be on top. In NGUI 3.0.2 you can also just set the 'depth' value on your panels instead.

Asset Store issues I really can't help you with. In my experience I've mentioned what the cause of them was, but if you're absolutely sure that's not it, then I advise getting in touch with the Asset Store team from Unity to see if they can diagnose the issue you're having. Just expect them to ask the same questions and insist upon the same things I did.

terravires

  • Guest
Re: Nothing but problems with 3.0.0, also can't update
« Reply #7 on: October 04, 2013, 03:11:59 AM »
I did watch the video. One of the first things I did was ensure I was using the new method for 3.0.0.

I tried using the ALT-SHIFT-= and via the NGUI menu "Bring to Front" and nothing changes.  Still shows 28-30 draw calls.

I did this on each and every panel I could find.  When will 3.0.2 be out?  Not sure if I'll be able to download it since I have issues with 3.0.1.


terravires

  • Guest
Re: Nothing but problems with 3.0.0, also can't update
« Reply #8 on: October 04, 2013, 04:20:59 AM »
Seems not mater what I try I either get lower draw calls but Z depth problems, or high draw calls and mostly working.

What I've tried is ALT-SHIFT-=, which sorts things so they appear correct, but draw calls are wrong.

I then move all the dynamic fonts to one range (say 150s) and others on the same atlas to 100s, then my Render Texture to 160.  Then things start to get crazy and widgets disappear when in play mode.  Usually they appear fine in editor.

Draw calls do go down as expected, but it's impossible to use.  I'm also seeing unexplained behavior when widgets are toggled on and off via NGUITools.SetActive().  Is there a problem with turning an entire panel on/off?


EDIT:
Here is one note, everything works fine until I start to have more than 5 panels on screen at once.  I'm not sure how do things without more than one panel.

I have a typical HUD that I'm using anchors, top/left, top center, top/right, etc.   Under each one of those I have my panels and then widgets.

Then I have a center anchor that has all my dialog windows, each with it's own panel.  These need to be drawn above the HUD (around zero depth) so I put them at 50+.  Then I have confirm dialogs that need to be the highest at 100 or 150.  Each of these are turned on and off as needed.

Problem is when I have more than 5 panels on screen stuff starts acting up.  Draw calls are very high as well.  I tried moving ALL my dynamic font to 150, all my sprits on the same atlas to 100/etc.  But that made things worse.  The examples are fine but once things start getting more complex is where they break for me.
« Last Edit: October 04, 2013, 04:42:34 AM by terravires »

terravires

  • Guest
Re: Nothing but problems with 3.0.0, also can't update
« Reply #9 on: October 04, 2013, 05:08:06 AM »
Latest Update:

I found one source of the random widgets disappearing is because the draw calls are turned on and off in the panels.  Clicking them back put it back on screen.  I still don't know what is causing them to get disabled yet though.

Sometimes just moving the mouse over a section of screen triggers this.  I don't have any fancy mouse-over disable stuff going on either.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Nothing but problems with 3.0.0, also can't update
« Reply #10 on: October 04, 2013, 11:39:27 AM »
If you click the draw calls out in the UIanel inspector, then it folds together that one and hides every widget that the draw call would draw - this thing about it is, thats saved BY NAME - which means that if you change to some other screen, then the draw call by that name will still be hidden. This means that the order of the draw calls will potentially mess that up.

Take a look at the UIPanel's inspector and check if some of the draw calls are folded.


Remember, whenever you have a new UIPanel it makes new draw calls for each material - if you have depth collisions (say 3 fonts and 5 widgets at the same depth, but in maybe 2 materials) it won't automagically sort them in a nice way - depth collisions are undefined and in a worst case scenario, you'd have 8 draw calls for just those 2 materials.

As for the asset store, it sounds like your unity is bugged. Try logging out, restart unity, re log in, re-download.

terravires

  • Guest
Re: Nothing but problems with 3.0.0, also can't update
« Reply #11 on: October 04, 2013, 04:42:16 PM »
Well it is in-fact a bug with unity.  I tried under a new project and get 3.0.1, but the import screen on my existing one keeps showing 3.0.0.  Even after deleting all NGUI folders, saving and restarting and re-importing.

Thing is I didn't turn these draw calls off manually.   If each new panel adds more draw calls, then is there really a point to having more than one panel? 

Root
> Camera
   > Panel
      > Anchor
           > Widgets
      > Anchor
           > Widgets
etc?

And surely there has to be a more effective way of handling depth then keeping track of huge numbers of widgets across the entire scene?  If I want a dialog box to appear, but I need to over ANY existing windows then I need to manually assign every widget a huge depth value?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Nothing but problems with 3.0.0, also can't update
« Reply #12 on: October 04, 2013, 08:45:31 PM »
In 3.0.2 you just give its panel a higher depth value. If you want to obtain 3.0.2 early, you can email me your OR# and I'll send you a download link.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Nothing but problems with 3.0.0, also can't update
« Reply #13 on: October 04, 2013, 10:33:47 PM »
If you click the draw calls out in the UIanel inspector, then it folds together that one and hides every widget that the draw call would draw - this thing about it is, thats saved BY NAME - which means that if you change to some other screen, then the draw call by that name will still be hidden. This means that the order of the draw calls will potentially mess that up.

Take a look at the UIPanel's inspector and check if some of the draw calls are folded.


Remember, whenever you have a new UIPanel it makes new draw calls for each material - if you have depth collisions (say 3 fonts and 5 widgets at the same depth, but in maybe 2 materials) it won't automagically sort them in a nice way - depth collisions are undefined and in a worst case scenario, you'd have 8 draw calls for just those 2 materials.

As for the asset store, it sounds like your unity is bugged. Try logging out, restart unity, re log in, re-download.
Good point, Nicki. Terravires likely folded a draw call on one of his UIPanels, which hid the draw call's widgets, and when the draw calls change, a different set of widgets gets hidden.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Nothing but problems with 3.0.0, also can't update
« Reply #14 on: October 04, 2013, 10:35:32 PM »
P.S. Love the review this guy left on the Asset Store, blaming NGUI for issues with the Asset Store:
Quote
I'm very tired of wasting hours trying to track down some random bug that appears. Even back in the 2.7.x days things were broken as soon as I purchased. (Major things like the font atlas maker) Now with the latest version that supposed to have solve the z-depth issues, it's another pile of bugs. Widgets dissappear and toggle themselves on/off even after play mode. Still have problems with widgets drawing themselvs. And final straw was trying to update Unity store says 3.0.1 but each download over the corse of several days only contains 3.0.0.

Bottom line, buggy and hard to use. Some good concepts but overall not worth the hassel.