Search Unity

EZ GUI - Powerful, Low draw call GUI solution

Discussion in 'iOS and tvOS' started by Brady, Jun 3, 2010.

  1. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    Go to the scripting reference. You can find it online here:
    http://anbsoft.com/middleware/ezgui/docs/scripting/index.html

    Then go to the class list and select UIScrollList. All the methods are documented there.

    To have them come together, use the appropriate arguments to RemoveItem(), then set the appropriate position easing settings toward the bottom of the scroll list's inspector. See the scroll list documentation (not just the scripting reference) for details on these settings.
     
  2. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    Great.
    Thank you.
    :)
     
  3. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    Hi Brady,
    I just realized Unity has Input.GetAxis, that can be used with mouse events. Does EZGUI have the same or similar with an input delegate?
     
  4. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    I'm not sure what you're asking. What functionality are you looking for that is similar to GetAxis that you would prefer to use in EZ GUI rather than GetAxis itself? There is a global input delegate you can register in UIManager, but I'm not sure that it's similar to GetAxis in the ways you're looking for.
     
  5. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    Well, I was answering another question when getAxis was raised. You see, if I could use getAxis, or a similar function in my input delegate, it would just eliminate a step or two in my code to check input movement.
     
  6. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    You can certainly use GetAxis() within your input delegate.
     
  7. tonemcbride

    tonemcbride

    Joined:
    Sep 7, 2010
    Posts:
    1,089
    Hi,

    I've got a weird spacing issue with the fonts that seems to happen on certain character sequences. If you look at this image you can see it happening: http://bit.ly/textbug

    The top '85' contains the characters 8,5 and a space at the end
    The bottom '85' contains just the characters 8 and 5

    Looking at Layout_Line it seems that the dx is different for each one so the spacing varies - the only way I could get it to look correct was to put a space or some other character at the beginning or end. Here's the debug info:

    "85" with no space:

    GetWIdth = 45.42857
    spriteFont.GetWidth = 60 (each character is 30 pixels)

    "85 " with the space:

    GetWidth = 56.78571
    spriteFont.GetWIdth=75 (8 and 5 are 30 pixels, space is 15)

    Any help would be appreciated!

    Tony

    p.s. The font I'm using is here if you want to test anything with it: http://bit.ly/fontlink
     
    Last edited: Jun 21, 2013
  8. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    Okay, I think I've finally addressed the character spacing issues once and for all. The changes will be in the next release, coming to the updates page probably sometime Saturday, and on the Asset Store as soon as the version submitted Saturday is approved. Thanks for your patience and help, I'm hoping to have finally put this nagging issue to rest. :D
     
  9. tonemcbride

    tonemcbride

    Joined:
    Sep 7, 2010
    Posts:
    1,089
    Sounds good - will give it a go this week and let you know if I have any problems :)
     
  10. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    Hi Brady,
    Sorry to bother you, but I can not figure out how to correctly code SetUVs().
    Code (csharp):
    1.  
    2. sunSpriteData.SetUVs(lowerLeftPixel(0,125),pixelDimensions(128,128));
    3.  
    Please get back to me when you can.
    Cheers,
    Ren
     
  11. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    SetUVs() accepts a Rect. So you need to define a Rect like so:
    Code (csharp):
    1.  
    2. sprite.SetUVs( Rect.MinMaxRect(left, top, right, bottom) );
    3.  
    4. or...
    5.  
    6. sprite.SetUVs( new Rect( left, top, width, height ) );
    7.  
    And since we're dealing with UVs, the values are in the range 0-1. There is also the method SetUVsFromPixelCoords() if you want to use pixel coordinates rather than UVs, as you have done in your example. In which case, as the documentation explains, use Rect.MinMaxRect() and supply pixel coordinate values.
     
  12. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    Great.
    Thank you.
     
  13. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    Hi Brady,
    I am not sure why but I am continually getting the error that "Object reference not set to an instance of an object". If we presume that the object is set in the inspector appropriately, then, and I am sorry for asking, but is there anything wrong with this code?



    Code (csharp):
    1.  
    2.     public GameObject sunSpriteObj;
    3.     SimpleSprite sunSpriteData;
    4.  
    5.     void Awake () {
    6.         sunSpriteData = sunSpriteObj.GetComponent<SimpleSprite>();
    7.         print(sunSpriteObj.transform.name); ///prints objects name
    8.         print(sunSpriteData);///return null!!!!!!!
    9.     }
    10.  
    11.     void setSunSmiling(){
    12.         sunSpriteData.SetLowerLeftPixel(32, 32);///cause of error
    13.     }
    14.  
     
  14. tonemcbride

    tonemcbride

    Joined:
    Sep 7, 2010
    Posts:
    1,089
    I would try putting your initialisation code in 'Start' rather than 'Awake' because the construction order isn't guaranteed as far as I know.


    Cheers,
    T


     
  15. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    It would appear GetComponent() is returning null, so are you certain the GameObject being referenced actually has a SimpleSprite component attached?
     
  16. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,349
    Can we use the mushroom demo assets for a commercial game ?
     
  17. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    Sure, that is fine. Though I'd love to know of any games you make using it. :)
     
  18. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,349
    Of course :), i will also add everything that contributed to the project in the credits

    Unfortunatly i dont feel ready yet to make a reveal of the project, it is rather big and working on it for 3+ years, but is still 1.5 or more years away from the final full product i have in mind.
     
  19. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    Brady,

    I just downloaded EZGUI from the asset store for a new project I'm starting in Unity 4.2. In the Asset store it says ver. 1.0798 July 13, 2013.

    I immediately receive 4 compile errors:
    Assets/EZ GUI/Plugins/EZ/GUI/Management/UIManager.cs(733,40): error CS0117: `UnityEngine.iPhoneKeyboard' does not contain a definition for `autorotateToPortrait'

    After commenting those out I get 5 more compile errors:
    Assets/EZ GUI/Editor/AnBSoft/Editors/UICtlEditor.cs(405,34): error CS0117: `UnityEditor.EditorGUIUtility' does not contain a definition for `UseControlStyles'

    Fixing them just produces more compile errors.

    In addition, I'm getting 106 obsolete code errors.

    My guess is the Asset Store version is not the current version.

    Anything you can do here?

    Thanks
    Allan
     
  20. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    The latest update will be submitted soon (hopefully today) and should cover everything up to Unity 4.3. Feel free to PM me with your Asset Store invoice number and I can e-mail you the latest version if you like.
     
  21. Shrk

    Shrk

    Joined:
    Nov 4, 2012
    Posts:
    3
    To solve change UIManager.cs at lines 728 ~731

    CODE: SELECT ALL
    iPhoneKeyboard.autorotateToPortrait = autoRotateKeyboardPortrait;
    iPhoneKeyboard.autorotateToPortraitUpsideDown = autoRotateKeyboardPortraitUpsideDown;
    iPhoneKeyboard.autorotateToLandscapeLeft = autoRotateKeyboardLandscapeLeft;
    iPhoneKeyboard.autorotateToLandscapeRight = autoRotateKeyboardLandscapeRight;


    to

    CODE: SELECT ALL
    Screen.autorotateToPortrait = autoRotateKeyboardPortrait;
    Screen.autorotateToPortraitUpsideDown = autoRotateKeyboardPortraitUpsideDown;
    Screen.autorotateToLandscapeLeft = autoRotateKeyboardLandscapeLeft;
    Screen.autorotateToLandscapeRight = autoRotateKeyboardLandscapeRight;

    AND for this error in unity 4.2 in UICtlEditor.cs file
    error CS0117: `UnityEditor.EditorGUIUtility' does not contain a definition for `UseControlStyles'

    replace the below line

    #if UNITY_IPHONE !(UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9 || UNITY_4_2)
    #end

    will fix the errors.. hope it helps..
     
  22. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    What version of EZ GUI are you using? These should all be part of the last few versions. The latest is 1.08, though it hasn't appeared on the Asset Store just yet.
     
  23. tonemcbride

    tonemcbride

    Joined:
    Sep 7, 2010
    Posts:
    1,089
    Hi,

    I was just wondering if you knew why Siri might be crashing the text field input on EZGui? When I tap the microphone button to enter text it just crashes but I'm not sure if it's a Unity issue or an EZGui one?

    Thanks,
    Tony
     
  24. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    There's nothing platform-specific in EZ GUI's keyboard code (well, it's specific between desktop and mobile, but all mobile platforms are treated the same, using Unity's standard API). So if there's crashing going on, I would suspect it's a Unity issue since EZ GUI just relies on standard Unity APIs. But if you still suspect it is EZ GUI-specific, feel free to e-mail me privately with a sample package that can reproduce the issue which I can take a look at.
     
  25. CrunchingKoalas

    CrunchingKoalas

    Joined:
    Mar 29, 2011
    Posts:
    51
    Hey Brady,

    I don't know if you're reading this topic still but your server (http://www.anbsoft.com/) is down - no way to download the latest version of your plugins or read the forum.

    Any chance it will be fixed soon? Or very soon?

    Cheers,
    Tom
     
  26. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    I just checked and both se to be fully operational. Must have been a short server hiccup.
     
  27. Diori

    Diori

    Joined:
    Jan 20, 2013
    Posts:
    12
    Hi Brady,
    All my EZGUI buttons is not working as I upgraded my project from Unity 4.2 to 4.3.4
    In first compile, I got Error message like Shrk said, and then I replace the code as he said, and the error gone. But my buttons still not working on Android Screen. But its still working in the editor.

    Thanks,
    Diori
     
  28. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    I'm not sure why that would be. I'm not aware of any reason why EZ GUI buttons would work in-editor but not on Android, unless it has something to do with your game repositioning colliders based on the smaller screen size that might then occlude your buttons, or something like that. If it isn't something like that, then feel free to e-mail me privately with a repro package that I can take a look at and I'll see what is going on. Thanks!
     
  29. Diori

    Diori

    Joined:
    Jan 20, 2013
    Posts:
    12
    Hi Brady,

    Any updates for the latest bug I encountered before in android screen with Unity 4.3?
    I already check that there is no misalignment collider. The button works for the first time, from Normal to Active state, but it will not going back to Normal state. I need it to be working to release my app soon. I will be appreciate any help. Thanks

    Regards,
    Diori
     
  30. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    I managed to look at your repro case today. I'm not sure if the problem is with the modifications you made to the EZ GUI sourcecode, but I built it with the latest version of EZ GUI (1.08 ) and the issue was resolved.
     
  31. Diori

    Diori

    Joined:
    Jan 20, 2013
    Posts:
    12
    How can I get the latest version? Should I purchase the plugin again?
     
  32. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    If you purchased directly from anbsoft.com, then you were provided with an updates link, which can also be found at the bottom of the EZ GUI product page (www.anbsoft.com/middleware/ezgui).

    If you purchased from the Asset Store, the latest version is available there.
     
  33. ldaughtry

    ldaughtry

    Joined:
    Oct 30, 2012
    Posts:
    38
    Hey all,

    We're having a problem on Android builds built using 4.6.1p3 (we needed to upgrade to this build to support devices on Android OS 2.2.3, 4.0.3, and 4.0.4).

    When a person enters text in a UITextField and accepts that text the device seems to freeze. However, if left for a long period of time (~30 seconds or so), the device will become responsive again. The UITextField will not be populated with any text though.

    Looking at logcat I see this message:
    W/IInputConnectionWrapper( 4399): getTextBeforeCursor on inactive InputConnection
    I/Unity ( 4399): windowFocusChanged: true
    E/RichInputConnection( 724): Unable to connect to the editor to retrieve text... will retry later​

    This has exhibited this on all Android devices that we've tried this build on. That's many for testers on 2.2.3, 4.0.3, and 4.0.4 and in house it's a Nexus 7 on 4.4.2 and a Galaxy Tab 4 on 4.4.2.

    Thoughts?

    (Posting in EZGUI forums as well for coverage)
     
  34. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    Just to eliminate possible causes, have you tested just the standard Unity keyboard display API under the same circumstances? EZ GUI just uses the standard Unity APIs to display the system keyboard and retrieve its content and doesn't do anything exotic. Also, what version of EZ GUI are you using?
     
  35. wendingwayfarer

    wendingwayfarer

    Joined:
    Jan 10, 2013
    Posts:
    7
    Hi folks,

    Pardon me for necroing this thread, but I am in a bit of a pickle here. I am dealing with some legacy code from late 2010 that depends on EZ GUI. I am able to get the software in question to run on an older version of Unity (3.0.0 works, 3.4 doesn't, anything in between I haven't tested). If I wanted to get my software compatible with anything resembling a modern copy of Unity, what would you recommend that I do?

    Thanks so much for any replies.
     
  36. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    It's a reasonable question. I have a game called GlassLand on iOS and Android and like a lot of people, I used EZ GUI to do all of the menu systems and user interface. I finally bit the bullet and converted the entire system to the newer UGUI once it was available in Unity 4.5. It really wasn't that difficult. As a matter of fact, once I got the hang of the new Canvas system, the conversion went pretty fast. I would say if you want to upgrade your game to newer versions of Unity, then that's your best path. On the other hand, if your game hasn't set the world on fire, why not just leave it as is and start on a new project.

    Allan
     
  37. John-B

    John-B

    Joined:
    Nov 14, 2009
    Posts:
    1,262
    I have some older projects that I've continued to update, and found that, for the most part, EZGUI works just fine in more recent versions of Unity, 4.x and 5.x. However, there's no longer any support for EZGUI, the forum is no longer active and mostly filled with spam now, and no recent updates. The few minor glitches I've found with more recent Unity versions have not been fixed and I've gotten no response on the forum about them. You need to be using the most recent version of EZGUI, which is still available last I checked, for the most recent versions of Unity.

    A while back, I started using the Unity UI, and the conversion from EZGUI went pretty smoothly, as chaneya mentioned. The only major obstacle I've run into is that there's no scroll list in Unity UI. I've tried several free and commercial scroll list assets, and none work as well or are as straight forward to implement as EZGUI's. Unity's scroll rect can be sluggish on iOS.

    Is there any way to use EZGUI's scroll lists with Unity UI?
     
    Last edited: Jun 13, 2016
  38. wendingwayfarer

    wendingwayfarer

    Joined:
    Jan 10, 2013
    Posts:
    7
    Thanks for your reply. Unfortunately, the UI system in use with this particular item is extraordinarily complex. Think interactive book, login system, and more. Rewriting the GUI would be more work than rewriting the gameplay.

    From what I can tell, my main issue is that EZ GUI that was used in 3.0.0 became incompatible with some version of Unity circa 3.4 or so. I recall patching other games at the time, but now I can't remember, and I'm not sure I still have access to the EZ GUI update that fixed it.

    Reading John B's comment, perhaps what I'm really looking for is a version history of EZ GUI with patch instructions, from about October 2010. I have no idea if this exists anywhere, and I'm not sure I still have my EZ GUI license documentation (assuming Brady still cares). Does anyone have anything like this? Is there a resource anyone could point me to, however old? In other words, how do I patch my truly ancient version of EZ GUI with the last one to come out?

    edit: FWIW, when I see EZ GUI here, I mean EZ GUI and Sprite Manager.
     
    Last edited: Jun 13, 2016
  39. tonemcbride

    tonemcbride

    Joined:
    Sep 7, 2010
    Posts:
    1,089
    One of the most likely issues is the #ifdef's found in EZGUI code. If you do a search and replace on the Unity folder with something like this:

    Original code: (might not even have UNITY4_0 support on your version)
    #if UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9 || UNITY_4_0 || UNITY_4_1

    Add recent unity versions
    #if UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9 || UNITY_4_0 || UNITY_4_1 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3 || UNITY_5_4 etc...
     
  40. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
  41. John-B

    John-B

    Joined:
    Nov 14, 2009
    Posts:
    1,262
    That forum is no longer active, Brady hasn't responded to anything in a few years, though there's a sticky about how to get the latest version in the EZGUI General forum.
     
  42. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    The latest version of EZ GUI should work for all versions of Unity up to, but not including, 6.0. The only real issue is, as tonemcbride mentioned, the #ifs that are required for version compatibility. But I definitely recommend using the latest version.

    As for scroll lists, unfortunately, there's not a way, at least not implemented now, to integrate EZ GUI's scroll lists with uGUI.
     
  43. wendingwayfarer

    wendingwayfarer

    Joined:
    Jan 10, 2013
    Posts:
    7
    Thanks again for your replies. Brady, I appreciate your continuing to answer these questions so many years on.

    According to the sticky: http://forum.anbsoft.com/viewtopic.php?f=10&t=56 I should go to http://www.anbsoft.com/updates/ezgui_updates.html . This complains that I do not have an activation key, as does http://www.anbsoft.com/updates/sm2_updates.html (I also need Sprite Manager, iirc). Since I'm unable to locate an activation key in my code, am I screwed, or do I have options? Rendering a fee is something I am willing to consider, if necessary.
     
  44. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    If you can e-mail me directly, I can look up your code, or just send you the latest build. I discovered a couple of missed messages, and if that's you, I've already sent you the latest versions. Let me know.
     
    Last edited: Jun 14, 2016
  45. wendingwayfarer

    wendingwayfarer

    Joined:
    Jan 10, 2013
    Posts:
    7
    Hi Brady, I haven't been able to get in touch with you via personal message or by email. In any case, I sent you both an email and a personal message on the unity forums, and I'm pinging this thread in the hopes that you have notifications enabled for it.
     
  46. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    Sorry, between E3 and my father passing away, I've gotten behind on my messages.
     
  47. wendingwayfarer

    wendingwayfarer

    Joined:
    Jan 10, 2013
    Posts:
    7
    Ouch, sorry to hear that :(

    For the record, I'd say you're pretty on the ball for software that is theoretically no longer supported since years ago.

    Thanks for all your help, and all the best to you and yours.
     
  48. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    Thank you.
     
  49. spacefrog

    spacefrog

    Joined:
    Jun 14, 2009
    Posts:
    734
    Hey Brady
    Hope all is well for you
    Just a quick question;: what's the latest ( = last ? ) version of ezGui available ?
    Is it the EZ_GUI_1.0820.zip from 12 March 2015 or is there anything newer ?

    Just starting to come back to Unity and always loved your gui Framework, just not sure if it's still feasible to work with ... Of of the major things i miss most with the Unity UI is the whole transitions that are part of ezGui.
     
  50. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    Yes, 1.082 is the latest. And while you may find the GUI itself dated, you'll be happy to know the panels and transitions still work great with any objects in world space!