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

eDriven.Gui

Discussion in 'Immediate Mode GUI (IMGUI)' started by dkozar, Jul 7, 2012.

  1. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Greetings to all!

    eDriven.Gui is a wrapper around Unity's Immediate mode GUI (or UnityGUI, i.e. the latest stable version of GUI that Unity provides out of the box).

    It is dependent on UnityGUI's feature set, and is compatible with UnityGUI's GUISkins and GUIStyles.

    I strongly believe that implementation and API of the Immediate mode GUI are superb! I did some demos using eDriven.Gui, which is actually the showcase of how powerful UnityGUI really is - in terms of where it could be taken while being so simple in its core.

    UnityGUI isn't forcing any particular component model, event model etc. and this is a great thing - this fact allows various framework implementations on top of it (much like Javascript frameworks on top of pure Javascript!).

    Demo site: http://edrivenunity.com/gui
    API: http://edriven.dankokozar.com/api/1-0/
    Asset Store: http://u3d.as/content/adjungo/e-driven-gui/36Q
    Video playlist: https://www.youtube.com/watch?v=_YuFw-Jtz0k&list=PL7EE340828F962941

    So many cool things coming up, stay tuned! :)

    Danko



    The other 2 threads covering eDriven.Gui:

    eDriven Q&A
    eDriven.Gui - GUI for programmers


    Promo video:



    Designer promo:



    Hello world video:

     
    Last edited: Jan 4, 2013
  2. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Last edited: Jul 10, 2012
  3. kefrens

    kefrens

    Joined:
    Feb 24, 2012
    Posts:
    11
    Really impressive!
    But 350$ is too much for me.
    Anyway fantastic work.
     
  4. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Guys, don't feel intimidated with the price. This is not a toy.

    This system is a result of many years of research and development. This is a complete RIA framework.

    but of course you can (for instance) go to the Asset Store and buy (just for example sake):
    1) Login dialog component
    2) Busy cursor component
    3) PHP login script

    ... spending $10 on it. You can then give those components to your programmer and tell him to "merge" them.

    But we all know it doesn't work that way :-|

    Unity needs a consistent way of doing asynchronous operations (let's call it "best practices"). eDriven (both core and GUI) is bringing it to the table.

    You can start using eDriven (core) right now: extract those 3 DLLs into your project: eDrivenCore-1.0.1.zip

    Code (csharp):
    1. using UnityEngine;
    2. using eDriven.Core.Util;
    3.  
    4. public class Main : MonoBehaviour
    5. {
    6.     void Start {
    7.         Timer timer = new Timer(1, 5); // every 1 second, 5 times
    8.         timer.Tick += delegate { Debug.Log("tick"); };
    9.         timer.Start();
    10.     }
    11. }
    Timer API

    Now, instead of Debug.Log you can do something more meaningful. Like instantiating enemies, or firing rockets.

    No yield statement in there. No blocking. Async stuff!
     
    Last edited: Jul 11, 2012
  5. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Making an image gallery with Unity3d and eDriven: http://edrivenunity.com/load-images

    This is a tipical Rich Internet Application (RIA) demo. It shows basic concepts of using eDriven.Core/Gui.

    Classes used in this demo:

    - HttpConnector [eDriven.Core]: makes a Flickr query and loads JSON data, which is then deserialized by JsonFx
    - TextureLoader [eDriven.Core]: loads images (both thumbnails and biggies) over HTTP and caches them locally
    - Pager: handles browsing results
    - GlobalLoadingMask: disables the display while the async operation is active
    - PopupManager: opens the big image in a popup window, exists on mouse click or wheel outside

    Also, the demo shows how to play an effect on multiple target (thumbnails) and how to disable autoLayout on a container while effect playing.

    Additionaly, it shows how to create a composite component (Thumbnail).

    Source is available, as always. Please comment!



     
    Last edited: Aug 16, 2012
  6. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Last edited: Aug 16, 2012
  7. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Drag drop demo: http://edrivenunity.com/drag-drop

    This demo introduces core drag and drop concepts. In drag drop there are a few most common operations, such as MOVE and COPY. These operations are being shown in this demo.

    Children of the source container should be dragged and dropped onto the children of the destination container.

    COPY operation is implemented in 4 flavours: copy text, copy color, copy text+color and copy data. With copy data, the data could be observed using Options->Inspector, Options->Details->Tab "Data".

    The class responsible for handling drag drop is DragDropManager.

    Drag drop operations use cursor management to give a feedback. The item being dragged is called a "proxy", and it can be fully customized (not shown in this demo).

     
    Last edited: Aug 16, 2012
  8. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Last edited: Dec 19, 2012
  9. gfoot

    gfoot

    Joined:
    Jan 5, 2011
    Posts:
    550
    Can you recommend a concise UI example (code, not a video) that demonstrates the general style of eDriven code? How does it compare to mainstream UIs like Qt, WPF, and Swing?
     
  10. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Those are not mainstream, or are they? ;)

    eDriven got its syntax from Actionscript (Flex) and Javascript. You can look at the source for Image gallery demo.

    Cheers!
     
  11. gfoot

    gfoot

    Joined:
    Jan 5, 2011
    Posts:
    550
    Thanks, that's very interesting.
     
  12. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Oh, thank you. :)

    Sorry for not sharing your opinion on "mainstream", but I'm totally into RIAs (for years now), and I believe these are the dominant technologies: Javascript, Flex and Silverlight.

    Unity could be the fourth one.
     
  13. gfoot

    gfoot

    Joined:
    Jan 5, 2011
    Posts:
    550
    Sure, different environments. It's just that most of the time I run into new GUI systems in the desktop world I get disappointed that they're not more like Qt. It achieved a level of programmability and automatic layout that was way beyond what most others offered. I haven't used it for a long time due to language choice, but I've been disappointed ever since with things like WPF (probably also Silverlight, by extension, and anything else XAML-based) being incredibly complicated yet still suffering from the usual flaws of visual designer-driven GUIs - especially, making it extremely difficult to make things scale properly to fit the space available.

    eDriven looks great though - the general flow looks a lot like jQuery, which ticked most of the boxes for me when I used it a bit in the past. When I get time I will have a closer look, especially at how you manage your layouts.
     
  14. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
  15. Techdread

    Techdread

    Joined:
    Sep 10, 2010
    Posts:
    25
    I'm interested in this GUI solution looks very professional, I have some questions.

    1. Is it compatible with mobiles Android IOS?
    2. if it is what are the Draw calls penalties ie does adding additional button equal another draw call etc. please don't tell me its using the built in Unity GUI that's a deal breaker.
    3. Is it touch enabled.
    4. How does it handle different screen sizes (resolutions).
    5 Are you going to run a beta test were we get it for cheaper or is there a demo version with watermark $350 is a lot to pay for a solution that might not fit.

    I have been using NGUI for a long time but am willing to switch for a more LOB GUI framework.

    Must say again from what i have seen looks very impressive.
     
  16. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    1. I didn't test it personally but the Godfather of this forum TM tested it and says it is. ;) Also, he sent me a working demo which works on my iPad.
    2. Yes, it's using GUIStyles. But it is optimized - runs on my wife's laptop without a glitch (faster than Javascript) :cool:
    (btw GUIStyles could be just one of the future outputs - I could perhaps separate the rendering logic and plug in... atlases? ... or maybe Unity 4 GUI? Who knows...)
    3. It works with touch screen, though currently with mouse events. I am planning to expose touch events through eDriven.Core very soon (the next thing). Then, when on mobile, GUI should use those events, and should hide cursors (yes it's funny to have cursors on iPad :))
    4. Only one pixel density, didn't do the retina thing, However, the layout stretches stuff, like in the AbsoluteLayout demo.
    5. Believe the Godfather's taste. ;) And yes, you don't have to pay it $350 since it's $250.

    EDIT: It works on iOS - see here.
     
    Last edited: Mar 14, 2013
  17. Techdread

    Techdread

    Joined:
    Sep 10, 2010
    Posts:
    25
    There is no optimising the existing Unity GUI that will get acceptable performance on mobiles. :(

    Will keep an eye on this product it tick's a lot of boxes.
     
  18. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
  19. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410

    Attached Files:

    Last edited: Aug 29, 2012
  20. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
  21. devprincess

    devprincess

    Joined:
    Sep 7, 2012
    Posts:
    116
    This is so great! But too expensive for me! I need to code some components like datagrids and lists for a college project... is there any option for students? Thanks for your time, this project is awesome!
     
  22. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Just found eDriven.Gui sitting on the 4th place of the Scripting->GUI->Top Grossing list.

    :)

     
  23. UNITY3D_TEAM

    UNITY3D_TEAM

    Joined:
    Apr 23, 2012
    Posts:
    720
    nice package
     
  24. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Thank you. :)
     
  25. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    OK guys, maybe you will also have a GUI editor :)

    Disclaimer: *** I AM NOT PROMISING ANYTHING ***

    (just to be loud and clear and not to repeat others mistakes)

    Just did a proof of concept on my idea for component descriptors with Unity which TOTALLY WORKS. :cool:

    - dragging dropping of components (prefabs) into the game object hierarchy
    - referencing style mappers via (string) name
    - in general, all the stuff that you currently do inside the CreateChildren() method
    - now on building component editors

    Once again: *** I AM NOT PROMISING ANYTHING ***

     
  26. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Making some editors... Unity Editor stuff really rocks! :)





     
  27. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    News:

    1. Giving a presentation on Unity soon, titled "Unity - game engine in RIA world". This will happen in WebCamp Zagreb. Basically a bunch of people talking about modern web technologies.

    Seems that Unity-RIA paradigm just has to start off in Croatia. :)

    2. I would like to kindly ask each eDriven.Gui user to rate or review it on Asset Store if he/she finds it useful.

    This is normally done from within Unity editor (opening the Asset Store window, finding eDriven.Gui in the "downloaded plugins" section and making a review).

    Note: more reviews mean more buys, so more of my time spending with the framework and more frequent updates and new features!

    Thank you :)
     

    Attached Files:

  28. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    eDriven.Gui 1.5 out now: http://u3d.as/content/adjungo/e-driven-gui/36Q



    Changelog:

    1. Added TooltipStyleMapper:





    2. Fixed a few glitches. One of the glitches was the "background bug", which was happening when scrolling the panel and the background got rendered over the panel header:





    Also updated eDriven.Core source and binaries.
     
    Last edited: Nov 20, 2012
  29. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    "Unity - Game engine in RIA world", WebCamp Zagreb 2012.

    A talk I did today on Unity and it's state in RIA (Rich Internet Applications) world.

    Download (Croatian): PPTX, PDF
     
  30. Sytto

    Sytto

    Joined:
    Jul 20, 2010
    Posts:
    28
    this is very interesting. it seems very polished. I also think it is a bit expensive. I think sales would increase greatly if you lower the price a bit. good work anyways!
     
  31. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Good news for you - the sale is on it's way: http://u3d.as/content/adjungo/e-driven-gui/36Q.
     
    Last edited: Dec 20, 2012
  32. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    eDriven.Gui is on sale! So, if you were planning to purchase it at a discounted price - this is the unique opportunity! :)

    Asset store link
     
    Last edited: Dec 20, 2012
  33. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
  34. sloopidoopi

    sloopidoopi

    Joined:
    Jan 2, 2010
    Posts:
    244
    Hi,
    first of all: this Asset looks very impressive!
    But 250 bucks is a lot of money to spend without having a chance to test the system ( to check the performance on mobile platforms) .
    Is there some demo version available for testing?

    cheers
     
  35. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Hi,

    You can find the WebPlayer demos here. Currently there are no mobile demos. But you can make an assumption that this system's performance is the same as the UnityGUI performance (which is it built upon), because eDriven introduces no bottlenecks. On the contrary: it fixes some of the performance issues because it turns the GUILayout off and uses it's own layout.

    Cheers!
     
  36. sloopidoopi

    sloopidoopi

    Joined:
    Jan 2, 2010
    Posts:
    244
    Thanks for the info.

    I realized that the eDriven.core seems to support touch events.
    Is this real multitouch or just single touch, because you use the Unity GUI system under the hood?

    cheers
     
  37. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    This has nothing to do with a GUI System. Also, eDriven.Gui events are not plugged into the touch system yet.

    I made no gesture recognizers (plugins) out of the box, but you could make your own and stick it in (basically state-machines..).

    To make a recognizer, extend the ITouchEventDispatcherPlugin interface. Then feed your plugin/s to TouchEventDispatcher using the AddPlugin method.

    Now all your plugins are being called asynchronously on each update if (touches.Length > 0).

    Soon I'll publish the next core version which will never make a single OnGUI call if not rendering GUI.
     
  38. sloopidoopi

    sloopidoopi

    Joined:
    Jan 2, 2010
    Posts:
    244
    Cool. I wasn't aware of it!
     
  39. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Created a simple demo showing the power of Unity's Immediate Mode GUI. :)

    http://edrivenunity.com/animation

    This is a WebPlayer (browser) demo, so please switch to the good old desktop computer.

    You can instantiate (real clickable) buttons as well as panels (complex controls). Tip: select the "Auto" checkbox and push it to the limit using the slider.

    As you can see, UnityGUI at its core is a very powerful and often underestimated technology!
     
  40. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Last edited: Feb 27, 2013
  41. Akdul

    Akdul

    Joined:
    Oct 29, 2012
    Posts:
    2
    Thanks for this great framework!. I have a question, does anyone know if the HttpConnector class (flickr demo) works in Android?. I could not test it because when I tried to run it, it told me that the scripts use isApplicationGenuine which requires a LVL key (which could not get at the moment). It still asks for the LVL key even if its a development build.

    Is there a way to remove it? I dislike the genuine check because users need to be connected to the internet in order to start the application. If it's in one of the Dll's I guess there's no way around it then :(

    EDIT: Nevermind, I was able to test it and it works great. But still it would be nice if we could get rid of isApplicationGenuine. Thanks again.
     
    Last edited: Feb 28, 2013
  42. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Hi, I will remove this line of code ASAP. Would that help? :)
     
  43. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    I've just removed it. Will be available with version 1.10.
     
  44. ParkerMan

    ParkerMan

    Joined:
    Mar 26, 2013
    Posts:
    11
    I purchased this from the store and getting up to speed with it.

    The borders have red/yellow around them: How do I remove it for the published version, or does it not display when published.

    $4-2-2013 12-29-15 PM.png
     
    Last edited: Apr 2, 2013
  45. ScrappyRMH

    ScrappyRMH

    Joined:
    Apr 11, 2011
    Posts:
    48
    I'm trying to create a basic toolbar and am running into problems. First, I can't seem to get a background to show up for the container that is the root of the toolbar. I'm just learning the Style and Skin part of Unity and find it a bit difficult to follow all the different places to put skins, styles, stylemappers and stylemapper names. The samples are nice but it would be helpful to have a tutorial that showed step-by-step how to create some basic layouts.

    The second problem is with re-ordering controls. I am using the designer and adding controls to a container. I've added a few buttons then a combo box and then a label. When i move the label before the combobox (using the eDriven.GUI panel) it shows it switching positions but is reset back to where it was whenever i go to another element and come back.
     
    Last edited: Apr 2, 2013
  46. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Hi! The yellow rectangle is just the selection rectangle visible in the editor. :)

    It shows which component is being selected and currently edited via the inspector.

    When exporting the app, no editor stuff is available, so is with this rectangle.

    P.S. Please post any further questions to eDriven Q&A thread!
     
  47. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Hi! :)

    Turning the container background ON and OFF has been described in depth in this Q&A post.

    For the Style and Skin part: these is the UnityGUI way of rendering stuff, and is really powerful. So you should just figure out how this system works by itself (how to style the a GUI.Button etc).

    However, this original Unity system was missing the level of flexibility that eDriven.Gui (hopefully) added. Using the style mappers you could style multiple stuff in the scene (at once), and also in consequent scenes is setting the mapper to Persistent.

    Yes, this is a known problem I'm currently working on.

    You see, Unity Editor offers no "native" way of keeping components in order if in the same hierarchy level (it takes care of the parent-child relations though). What some of the other GUI framework authors do is they rely to another Editor feature - the alphabetical sorting based on transform names. So with these frameworks you have to carefully name your controls ("button-1", "button-2" etc.) to keep them in order.

    I wanted to have a reliable system of (re)ordering, so I came with my own system of creating a GUID for each new component and saving the list of GUIDs with the scene.

    However, this system still has a few bugs and I'm working on them right now.

    The version 1.11 (will be online in a day or two) will introduce the additional stability (multiple bug fixes), but hoping to solve all the ordering bugs in 1.12.

    Until it is solved: when having this type of a problem, please use the button just on top of your order display. It will reset the order by clearing all the GUIDs in the saved list, so it will hopefully listen to your reordering actions! :)



    P.S. Please post any further questions to eDriven Q&A thread! :)
     
  48. lylenical

    lylenical

    Joined:
    Apr 28, 2013
    Posts:
    8
    hi,
    $QQ截图20130428160155.jpg
    look at the pic, the logo and the background , how can i make the image StretchToFill.
    i've already tried the TextureDisplay, but it does not work.
    so i have to use Image, but there is no ScaleMode
     
    Last edited: Apr 28, 2013
  49. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Hi,

    the reason is that at one point I started to use GUIStyle.Draw for drawing images, instead of GUI.DrawTexture. I guess I should use the second, so you will have both the scale mode and aspect ratio exposed:

    Code (csharp):
    1. GUI.DrawTexture(RenderingRect, Texture, ScaleMode, AlphaBlend, _aspectRatio);
    This will be available in v1.12.
     
  50. lylenical

    lylenical

    Joined:
    Apr 28, 2013
    Posts:
    8
    when can we get it?