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. EskemaGames

    EskemaGames

    Joined:
    Jun 23, 2010
    Posts:
    319
    This package rocks!!!! and just a few hours after the release, a new version is almost ready, supporting texture packer files (renamed to .txt) with rotated sprites support :)
     
  2. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Thank you, but you forgot the most curious part -- the support for texture packer files comes from you -- someone who just picked up the kit.
     
  3. EskemaGames

    EskemaGames

    Joined:
    Jun 23, 2010
    Posts:
    319
    hehehe Yeah you're right, just send me my usual 5000$ via paypal and we're done LOL!!
     
  4. EskemaGames

    EskemaGames

    Joined:
    Jun 23, 2010
    Posts:
    319
    The next step should be to support hd/sd textures for mobile devices (iphone4 and ipad) ;)
     
  5. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    If you mean support for textures with different resolutions, that question was asked earlier in the thread and I showed how to do it.
     
  6. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    What should i set Root for bounds as
     
  7. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Root-most object of your entire area. For example, if you have a large surface with a bunch of buttons on it, the root would generally be the surface or the parent of the surface. Everything under this root object will be considered as a part of it for the sake of bounds calculations. Just make sure there is at least one collider (a large one on the surface would work, for example).
     
  8. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    Alrighty so i got the drag working but now when i drag it leaves a trail o_O

     
  9. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Set the camera's clear flags to be Background Color. :)
     
  10. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    Well what i want to do is draw this GUI over another camera which renders everything else and is the character camera. I have that all working and everything but from what it says is to set the clear flags to depth only if i want to do that if i change it to background will that still allow me to draw over the other camera?
     
  11. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    First camera to render should clear with a skybox or background color, second camera should clear only depth.
     
  12. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    I got it working now :p thanks for the help!

     
  13. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Of course. :)
     
  14. Hans

    Hans

    Joined:
    Feb 20, 2007
    Posts:
    422
    looking through the Tuts now, the interface is definitely growing on me :)
     
  15. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    Looks like a great product. Question: Do the fonts also work from Glyph Designer from Mac? It can export in EZ style format and other types. If that works, I'm sold :)
     
  16. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    I am not certain -- what format does it get exported in? If it can export in BMFont's format, then yes.

    If you send me a FNT file + texture, I can tell you.
     
  17. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    Ah great, FNT export is supported. Can you mail PM me your email? I'll send you a FNT and png file then. BMFont is nice, but Glyph Designer is THE tool (stable, fast, better export options etc). Amazing tool.
     
  18. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Tested, had to tweak 2 lines of code. Updated the package -- so now yes, it does. :)
     
  19. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    Awesome!!! :)

    Will buy that for my next project, thanks for testing.
     
  20. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    oh one more question: What about sliders? Possible? Already implemented?

    The most common controls from EZ GUI that I use today are:
    - Buttons
    - Labels
    - Checkboxes
    - Sliders
    - Scroll views and
    - Compound containers as item inside the scroll views

    Is that all possible and easily do-able?

    Beside that, I use the menu transition methods a lot, like spring -flying in etc.
     
  21. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Edit: No longer relevant: UISlider is now Tutorial 10
     
    Last edited: Dec 11, 2011
  22. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Buttons, labels, scroll views, compound containers -- examples of these already exist. I will add checkboxes and the slider script above to the list of tutorials. It's all very trivial.
     
  23. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    Very cool. Thanks!
     
  24. Hans

    Hans

    Joined:
    Feb 20, 2007
    Posts:
    422
    Hello ArenMook

    the ppl who brought of paypal - they just keep using the same link?
     
  25. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    To get updates? Yes. All updates are available via that page.
     
  26. Hans

    Hans

    Joined:
    Feb 20, 2007
    Posts:
    422
    yes

    Great thanks for the great gui kit, slowly getting the hang of things, non programmer here
     
  27. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Hey, thanks for buying it. :p
     
    Last edited: Dec 11, 2011
  28. Hans

    Hans

    Joined:
    Feb 20, 2007
    Posts:
    422
    so the ppl who brought it now - will they get free updates or do they have to buy again for the new update at 65?
     
  29. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Updates are always free.
     
  30. DanTreble

    DanTreble

    Joined:
    Aug 31, 2010
    Posts:
    590
    That sir is genius, sold.

    Only downsides I can see, and they are minor
    1) Wont work in 3d with any kind of perspective on the scroll list
    2) Might introduce a bit more overdraw, depending on the ordering of the cameras and whether the zbuffer is being cleared
     
  31. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Can't argue against either points. :)
     
  32. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    I do have a request though, i cannot find too much info on texture atlas's mind putting together a tutorial about it and what tools to use?
     
  33. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Certainly. The latest version of NGUI also has a way to automatically populate the list of sprites for the atlas by importing a json file created by the texture packer (http://www.texturepacker.com/, I guess?) -- Eskema created that mod earlier today that added support for it, then I cleaned it up and made it a part of the kit.

    Here's a tutorial on how to create sliders: http://www.tasharen.com/?page_id=340 -- now a part of the kit.

    I will go about creating more tutorials soon, but first I must get some sleep... :)
     
  34. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Version 1.04 features a tutorial on how to make a checkbox and even shows how simple the actual checkbox script really is:



    NGUI's design allows most functionality scripts to be even shorter than that. In fact, you could edit out everything but the mChecked variable and the OnClick function, and it will still work. :)

    I've also adjusted the UIAtlas documentation page with Texture Packer atlas export related information. I haven't added a more detailed explanation on how to creat ethem without the texture packer just yet, but I will soon.
     
    Last edited: Dec 11, 2011
  35. the_gnoblin

    the_gnoblin

    Joined:
    Jan 10, 2009
    Posts:
    722
    Wow, looks cool.
    Thank you for creating this product!
     
  36. kheng

    kheng

    Joined:
    Oct 22, 2008
    Posts:
    126
    When using the UIAnchor can the pivot be moved to where we actually set the side too. Right now it stays centered to the object. I'm using it on a UILabel and it's just a little annoying to keep on changing the offset if I change the font or text.
     
  37. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    UIAnchor is meant to "glue" something to either center of the screen, the corners, or the sides of it. It has an offset parameter that specifies by how much it adjusts the calculated position. Unless I am misunderstanding, you are trying to use it to anchor widgets to an object with a specified offset? Simplest way of doing that would be to add a child game object in between the two with the offset you want.
     
  38. kheng

    kheng

    Joined:
    Oct 22, 2008
    Posts:
    126
    I understand the offset, but what I would like is to be able to align the text Left, Centered, or Right for UILabel. That way when I use UIAnchor and for some reason I need to change the text or font, it would still be justify to what I set. If this isn't clear I can create a pic of what I mean.
     
  39. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Oh, gocha. I'll put it on my list. :)
     
  40. kheng

    kheng

    Joined:
    Oct 22, 2008
    Posts:
    126
    While your at it, it'll be nice to justify to the 4 corners too:D
     
  41. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Yup, no problem. It might be a bit though, I am trying to figure out how to record videos right now... and man do I suck at that... :)
     
  42. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    I've created a video covering the basics of NGUI:



    Still on the todo list: atlas creation tutorial.
     
  43. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    The video is excellent - NGUI looks really good. Would definitely like to see more video tutorials though, including (as you've suggested) an atlas creation tutorial. Would love to be able to continue using Texture Packer..........

    Also, something around "attaching" code on buttons etc is a must. i.e. - I create a button, how/where do I attach the code that is executed when the button is pressed. What if it's a single press? What if the player is holding the button down? etc...
     
  44. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    I'll put one up first thing in the morning. And if you're using a texture packer then there is no tutorial needed really -- export it in Unity3D format, drop the resulting PNG and TXT file somewhere where Unity finds them, create a new UIAtlas, drag drop the TXT file and NGUI populates all the sprites for you. The video should illustrate this process tomorrow.

    As for attaching code... Where is it executed? On whatever has the collider -- whether it's a widget or an in-game object: http://www.tasharen.com/?page_id=160 :) If it has a collider, it will be receiving all the events -- OnPress, OnClick, OnHover, etc. Simply create a script such as:

    Code (csharp):
    1. public class CustomListener : MonoBehaviour
    2. {
    3.     void OnClick()
    4.     {
    5.         Debug.Log("I was clicked on!");
    6.     }
    7.    
    8.     void OnHover (bool val)
    9.     {
    10.         Debug.Log("I was " + (val ? "hovered on" : "not hovered on"));
    11.     }
    12. }
     
  45. ironwill96

    ironwill96

    Joined:
    Dec 12, 2011
    Posts:
    18
    Love the tutorial video that is way more helpful to me in getting started then the written examples since I can see visually what you are doing. I've already got a nice sample UI created following the video, this system seems really powerful love it! Glad I bought it before the price went up after your heads up on that on the forums :).
     
  46. kheng

    kheng

    Joined:
    Oct 22, 2008
    Posts:
    126
    In example 1, the type area, you can't delete any letters only type them.

    Also how do you access the UILabel font in script? I want to make a button that the text changes depending on something happening.
     
  47. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    @ArenMook - thanks for the clarification. And sorry - I totally missed that event page on your site :)
     
  48. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    Delete works fine for me. You sure it's not working?
     
  49. ironwill96

    ironwill96

    Joined:
    Dec 12, 2011
    Posts:
    18
    @ArenMook - for your next tutorial video i'd love to see one where you build a UI like you did in the first one, but do it in an existing project that already has a camera etc. In essence, how do we implement in a project we already have going which is what the majority of us would be doing I imagine. I got it mostly working by working orthographically then converting it into 3-D UI and playing with the scale, but some of the scripts such as UIColorState did not work in my setup and it did when I started from the tutorial1 scene as you do in your tutorial video. I can't figure out the difference, but it gives me a null reference exception and i'm attaching the scripts to the right objects.
     
  50. kheng

    kheng

    Joined:
    Oct 22, 2008
    Posts:
    126
    Last edited: Dec 12, 2011
Thread Status:
Not open for further replies.