Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

NGUI (Next-Gen UI) -- demo final feedback request

Discussion in 'Assets and Asset Store' started by ArenMook, Dec 8, 2011.

Thread Status:
Not open for further replies.
  1. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    o_O

    That's interesting... I just tried it on an old OSX 10.5 latop with an Intel card and they run fine.
     
  2. terenctb

    terenctb

    Joined:
    Jun 2, 2009
    Posts:
    12
    I was looking a UI framework for a game I am working on, and so NGUI seems to have a good architecture but I am stalled on getting it because there seems to be some issues with some of the examples. I am on a Mac Book Pro 3.06Ghz running Lion with the latest(Not beta) Unity plugin-in.

    I have attached a video to show what I mean. I am running Chrome and Firefox(both have issues).
    http://youtu.be/M2VjfL49no4
     
  3. holyjewsus

    holyjewsus

    Joined:
    Mar 7, 2011
    Posts:
    624
    hmm, I don't get these errors shown in the videos, but were these last examples built with the beta?

    i am also using the non beta webplugin
     
    Last edited: Jan 3, 2012
  4. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    All examples have been built in Unity 3.4.2. Examples 1, 2, and 4 all don't do anything fancy. Geometry is generated once, and Unity simply draws it. There is no post-processing, no run-time modifications done at all. The shaders used are dumb-as-bricks -- they aren't even shaders per say, just fixed pipeline instructions for optimal performance, and the same one is used in all the examples you clicked on.

    First example you clicked on is using a single 3D camera and it looked messed up. Second example had dual orthographic cameras and looked fine. Fourth had a single orthographic camera and looked messed up -- there is no consistency, it's like something is wrong with your browser, Unity, or possibly your videocard. Edit: Nm you said you tried firefox. Hmm. Anyone else had anything like this?

    You can also try this -- http://www.tasharen.com/sg/ -- this project was built a while ago.
     
    Last edited: Jan 3, 2012
  5. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
  6. holyjewsus

    holyjewsus

    Joined:
    Mar 7, 2011
    Posts:
    624
  7. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    @redmacmanz: Your issue is likely with the videocard driver not supporting the refractive shader, which is why you aren't seeing the UI in examples 5 and 6 (although curiously enough that shader does have a built-in fallback that should have been enabled -- I guess that didn't function as intended). That's the only difference between examples 5 6 and the rest of them -- just the shader.
     
  8. holyjewsus

    holyjewsus

    Joined:
    Mar 7, 2011
    Posts:
    624
    unfortunately I have even stranger news for you!

    I viewed example 5 the day you posted it and it worked fine. oh noes!
     
  9. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    But now it doesn't?
     
  10. holyjewsus

    holyjewsus

    Joined:
    Mar 7, 2011
    Posts:
    624
    yes, this makes me think it's got to be on my end somewhere.
     
  11. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    I had the same problem, but after simply refreshing the browser, all looks great.
     
  12. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    If you press CTRL+Minus a few times in the 5th example, it will drop the quality level used by the shader, eventually downgrading to no shaders used. CTRL+Plus has the opposite effect.

    Edit: Also updated with one of the changes reverted, maybe that will help.
     
    Last edited: Jan 3, 2012
  13. holyjewsus

    holyjewsus

    Joined:
    Mar 7, 2011
    Posts:
    624
    yes, control - worked, very strange.
     
  14. terenctb

    terenctb

    Joined:
    Jun 2, 2009
    Posts:
    12
    The UI on the space example has issues but the game is fine. Not sure what is going on. All my own build are fine.
     
  15. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Well, if someone is having some obscure rare issues happening on their computer I am certainly willing to sit down and track down the cause by workin with them (even if its likely a hardware / driver issue Unity is running into), but I need more to go on than that. :|

    @terenctb: If the UI looks broken but the game looks fine then this implies a video driver issue. There is something happening that your driver doesn't like -- perhaps the fact that the UI shader doesn't write to depth.
     
    Last edited: Jan 3, 2012
  16. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    Hey aren, we have been having issues trying to package up a project to import into another project. Basically ModernMosis built a UI for our flash game and when he exports it to a package and attempts to reimport it(including all the atlas's) the ui ends up bugged. He states that the positions on the atlas get messed up and no matter what ends up having to rebuild the interfaces.
     
  17. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Without knowing how he creates the package there isn't much I can help you with. All I can suggest is make sure he exports everything. Right click, select dependencies, then export. With NGUI it's easy for me as I simply select the NGUI folder then export it as everything is a child of that folder. I am guessing in your case that's not the case.
     
  18. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    You are correct, usually i use a folder caled UIAssets i will relay the message and see if it fixes the issue, thanks aren :). Yea he just uses unitys package exporter.
     
  19. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    Hey aren I asked him and he said he did select include dependencies when exporting to a unity package. This is his reply about what's happening " The positioning for where the images are on materials is messed up but when i look at the font. the font works and is using the same atlas and material"
     
  20. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    He also states that he recreates the prefab and yet the image positions are still messed up in the atlas. Its like its not saving the information for our atlas o_O.
     
  21. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    "the positioning for where the images are on materials" <-- I'm not quite sure what he meant by this.

    What version is he using? Where is he modifying the atlas? In the scene view or the hierarchy? If the former, make sure he hits Apply to migrate changes into the prefab. If it's the latter, have him try bringing it into the scene, modifying it there, then hitting Apply and see if that works.
     
  22. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    That's what he did, he means the text file that assigns the image location doesn't even work to fox it. He has to export a new atlas with texture packer. He is using the latest.
     
  23. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Text file that assigns the image location... do you mean the atlas definition file? Why wouldn't it work if it worked in the project he created the package in? That doesn't make sense. o_O
     
  24. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    Thats what im trying to figure out lol, it has actually done that to me a few times with font atlas's until i finally gave up and just put the font into its own atlas. I had the settings correct for the size of the image and the location in the atlas but it still ended up in the wrong spots and blurry. It might just be something with unity 3.5 beta because in 3.4 i never had an issue with the atlas lol.
     
  25. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    You find the weirdest unreproduceable issues... did you ever figure out what those massively blurry textures were caused by?
     
  26. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    Well from my experience so far, if the atlas is too large(I.E all images needed for a game + font) the images end up getting very blurry so that is why i had to split up the atlas's even though i only had probably 10 images + the font and only 2 of the images were around 300w X 100h and the rest were tiny additions like healthbar or lives indicator etc. Is there a max size allowed for an atlas?

    Try this, create a random atlas and put it inside of a seperate folder called UIAssets and make a quick window then export it as a package and try to import it into a blank project. That is what he did created the interfaces and things we needed and exported(including the scene) and it ended up messing up the atlas when he reimported it.
     
  27. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Oh...

    I see what's wrong.

    In the new project, select your atlas texture. Increase its size. I'm guessing it's something like 2048x2048, but Unity imports it as 1024x1024 by default. This would cause it to be offset, and importing to not work correctly. The limit is pretty high on today's videocards. Mobile devices like it 2048x2048 or smaller, with 3g needing it to be even smaller than that.
     
  28. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    Awesome thanks aren idk how i didnt notice that lol i passed the message on hopefully it works ;)
     
  29. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    When the problem simply doesn't make sense it's always something obvious. :)
     
  30. ranilian

    ranilian

    Joined:
    Dec 24, 2011
    Posts:
    45
    Hey Aren,

    I was wondering what would be the best way to handle touch/click events on UIWidgets that are placed on top of each other. I know that we can control this with the z-order by moving a widget forward to receive the events and backward to not receive them.

    However, if the UIWidget has a UIAnchor on it, the Z-order can't be changed and is always defaulted to 0. So I was wondering shouldn't the depth field be used instead to handle such a case? What do you think?
     
  31. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    You could simply grow one widget's collider along the Z, then you don't need to move anything. Events are received by colliders, which don't know or don't care anything about depth. Since you can adjust the collider's scale or position independently of the transform though, this hasn't posed an issue in the past.
     
    Last edited: Jan 3, 2012
  32. terenctb

    terenctb

    Joined:
    Jun 2, 2009
    Posts:
    12
    As you know the Mac has the drivers all bundled with the OS, so it's a bit strange that more people aren't having the same issue. If it's a depth issue, wouldn't other games have problems (Admittedly the only game I play on this machine is Wow once in a while). I would be happy be be a guinea pig to help you solve this problem though. The UI I am using right now has strange text rasterization issue. You can PM me if you want. The game I am working on is (http://bit.ly/ebakQw)
     
  33. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    That's the thing, I have a Mac and I tested the UI on it, everything worked perfectly both directly in the Web Player and in Flash... Weird stuff. I'll create a couple of different builds for you to try in the morning. Since you mentioned that the Space Game's UI also looked messed up for you I have a solid starting point. That kit has been out for months and no one has ever mentioned an issue with the UI. Thanks for offering to work with me to track down the cause. :)
     
  34. holyjewsus

    holyjewsus

    Joined:
    Mar 7, 2011
    Posts:
    624
    do you also have a nvidia 330m?
     
  35. ctsteve123

    ctsteve123

    Joined:
    Sep 13, 2007
    Posts:
    51
    I have a Macbook pro


    NVIDIA (0x10de) GeForce 8600M GT
    Intel Core 2 Duo 2.4 GHz

    and the examples 5,6 GUI and the spaceship GUI are not working.

    With example 5 if I do as suggested above and use "ctrl -" twice it works. Example 6 does not work doing this.

    Hope this helps. I would also be willing to test.
     
    Last edited: Jan 4, 2012
  36. holyjewsus

    holyjewsus

    Joined:
    Mar 7, 2011
    Posts:
    624
    Sorry to clog up this thread, let me know if you want to take it to email,


    definitely some kind of driver issue as you said, as these examples display fine in windows using bootcamp... who to report this bug to, unity?

    is it possible you built these with 3.4.2 f2, I think f3 included a fix for mac os x lion and nvidia gpus not displaying things correctly.
     
    Last edited: Jan 4, 2012
  37. ModernMosis

    ModernMosis

    Joined:
    Apr 28, 2011
    Posts:
    29
    Hey, got another problem. So when i add a label on top of a couple layers at a depth of 5 while everything else >= 4. The Label will not show in the Game View. While in the scene view it "usually shows up". The only way i can get it to show in the game view is make the labels z axis -0.1. Any ideas.
     
  38. holyjewsus

    holyjewsus

    Joined:
    Mar 7, 2011
    Posts:
    624
    @mosis
    this could be whats happening
     
  39. terenctb

    terenctb

    Joined:
    Jun 2, 2009
    Posts:
    12
    It a Mac Book Pro, 17 inch 3.06 Intel Core 2 Duo with a GeForce 9400M running Lion 10.7.2
     
  40. SoulWind

    SoulWind

    Joined:
    Aug 25, 2011
    Posts:
    23
    depth can control only if all your pictures use one material...
    are you use two or more material?
     
  41. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Thanks guys, I will take a look at it. I happen to have a MacBook Pro with a 330m, it's just usually permanently in BootCamp and just as redmacmanz said it works perfectly on the Windows side. Sounds like a Mac driver issue.

    @ModernMosis: Yup, just as mentioned, if you are using different materials you need to alter the Z value. I suggest merging your font texture with your atlas texture, then everything will show up properly.
     
  42. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    ...or not. Everything looks fine. Maybe it's a problem with the updated Lion 10.7 drivers, because I am not getting this issue on 10.6.

     
  43. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    3.4.2 f2 is the latest according to Unity updater, there is no f3.

    If the space kit GUI is not working, which is dead-simple, but hitting Ctrl+Minus twice on Example 5 makes the UI show up there (which is more advanced as it has normal mapping/lighting), then this implies that the problem lies in some quality setting differences between Fantastic/Beautiful and Good qualities. Just looking at the settings here, the differences are: Soft Particles, and Anisotropic Textures.

    Here are a couple builds to try:

    http://www.tasharen.com/ngui/test1/
    http://www.tasharen.com/ngui/test2/
    http://www.tasharen.com/ngui/test3/
    http://www.tasharen.com/ngui/test4/
    http://www.tasharen.com/ngui/test5/
    http://www.tasharen.com/ngui/test6/
    http://www.tasharen.com/ngui/test7/
    http://www.tasharen.com/ngui/test8/
     
    Last edited: Jan 4, 2012
  44. SoulWind

    SoulWind

    Joined:
    Aug 25, 2011
    Posts:
    23
    I'm using 3.4.2 f3...
     
  45. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Hm, you're right. I just downloaded the latest from the website and it's f3. "Check for Updates" feature was lying to me.
     
  46. terenctb

    terenctb

    Joined:
    Jun 2, 2009
    Posts:
    12
    Test 1 works...the first time..but some how it doesn't work anymore (no UI)

    Test 2, I don't see any UI at all...

    It seems after i run Test 2 , test 1 is broken.. i will play around with it more later.
     
    Last edited: Jan 4, 2012
  47. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Test 1 was built with 3.4.2f2, Test 2 was built with 3.4.2f3. Both have anisotropic textures turned off.
     
  48. terenctb

    terenctb

    Joined:
    Jun 2, 2009
    Posts:
    12
    When I do control-minus twice, the UI pops into place..If I do plus..it dissapears.. This is for both. Possibly 1 was set to high and the other to medium?
     
  49. mydingefnysen

    mydingefnysen

    Joined:
    Dec 15, 2011
    Posts:
    51
    Hey Aren! Thanks for the frequent updates!

    I have a question concerning the new draggable window example. When I run the profiler on it I get frequent huge GC.Collect-spikes (around 350 ms, totaling 99.7% that frame). Does this happen for you as well?

    Edit: That is when I drag it around, no change if I turn the two check boxes off.
     
    Last edited: Jan 4, 2012
  50. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    @terenctb: I think at this point we can safely say that the issue lies with Unity not playing well with OSX Lion.

    @mydingefnysen: That would be because the UI gets rebuilt each frame while you are dragging it, so buffers get created. NGUI is optimized so it doesn't touch the meshes while nothing is changing. The spikes aren't noticeable here at all, cetainly not 350 ms. Restart Unity and they should go away.
     
Thread Status:
Not open for further replies.