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

Daikon Forge GUI Library

Discussion in 'Assets and Asset Store' started by TakuanDaikon, Aug 6, 2013.

  1. Morten88

    Morten88

    Joined:
    Nov 9, 2012
    Posts:
    3
    Just wanted to say very nice work. We have finally found a GUI system that works for us.
     
  2. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,459
    Daikon: I know that you are are quite busy at the moment, I just wanted to add a Feature Request for a future update:

    Curved Line support. Another GUI called EVO has this support and it would be very handy to have for making diagrams with
    Daikon.

    $EvoCurvedLines.png
     
  3. PJRM

    PJRM

    Joined:
    Mar 4, 2013
    Posts:
    303
    Well hide this evaluation version on your webpage. had to google to find it.
    Hope i like it. I regret that I didn't buy it few weeks ago.

    Best regards,
    PJRM
     
  4. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    I hope you like it as well. The link to the eval version is included in the original post in this thread, but isn't really posted elsewhere because that version is perpetually behind the full version in terms of features and bug fixes. It's sufficient to give someone an overview of how DFGUI works and to get a feel for the workflow, but isn't an accurate representation of the current state of the product.

    I'd like to keep it more up-to-date, but time is a precious commodity and I find myself spending all of my time fixing any issues that are reported and implementing features and enhancements that are requested by current customers, and keeping the current customers happy is the top priority.
     
  5. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
    A new version of UI Damage with DF-GUI support has been released to the store!

    Asset Store Link

     
  6. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    A new update has been submitted to the Asset Store, and will be available after approval from Unity. Among the changes for this version are some new design-time features such as guide lines, improved control editing, a new touch-screen virtual joystick example, a new radial menu example, and quite a few bug fixes:

     
  7. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    I was suitably teased by the 3D-space GUI you demoed recently. Are you still exploring that feature?
     
  8. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    Indeed. Assuming that feature makes it into the asset some day, DF-GUI would become *the* solution for Oculus Rift UI's in Unity. While it's straightforward to render a DF-GUI UI (or any UI I would think) to a render texture for integrating it into a stereoscopic 3D world, mouse support is much tougher. Really looking forward to that feature too!
     
  9. sandboxgod

    sandboxgod

    Joined:
    Sep 27, 2013
    Posts:
    366

    Thank you so much!!! I've just run into that bug just now so went to go check for an update. Whew!
     
  10. sandboxgod

    sandboxgod

    Joined:
    Sep 27, 2013
    Posts:
    366
    New radial menu example is really cool man. Good job! Excellent update
     
  11. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,459
    Thanks for the new Update. Super cool features. Joystick works great.

    The radial menu is also very nice. One thing I noticed when testing on Iphone4,
    the + button works the first time but after that it no longer respond to touch.
    I noticed that for some examples, auto rotation doesn't resize text in the textbox properly.

    Cheers and keep up the Tremendously Awesome work.
     
  12. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    733
    In a recently buying in the store I saw a handy solution which could be used also in DF.
    You could put in the store a package with a little tool that asks which version to instal: compiled or full source.
     
    Last edited: Dec 27, 2013
  13. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    When I have a dynamic font assigned to the font property on an object I get a "The specified font uses a different Material.." warning. Is that just the case when using dynamic fonts or is there a way to add the dynamic font to the atlas?
     
  14. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Dynamic fonts cannot be added to atlases, so that will always be the case if you use a dynamic font (it will add draw calls).
     
  15. c-Row

    c-Row

    Joined:
    Nov 10, 2009
    Posts:
    847
    I am using DFGUI in my current project and ran into a very strange problem yesterday. I have created a scene in my project in which I constructed a GUI with several objects - panels, labels, a scrollbar, a little data binding, nothing too fancy in my opinion.

    One of the elements I created has been turned into a prefab to get instantiated at runtime. I am not aware of any obvious things I changed about that scene's setup, but whenever I save the scene with the prefab in it and quit Unity it freezes on the next start. The problem persisted on a second client even after installing the latest update of Unity.

    I managed to restore most of the scene's contents by opening one of the DFGUI example scenes directly from Finder, and once Unity is up and running I can then open my previous scene like one would expect, with the prefab still intact and the game behaving normally at runtime for the moment. I then turned all the scenes elements into prefabs and added them to a new scene one prefab at a time, quit Unity and tried to start it again. This way I managed to narrow down the number of possible offenders to that one single prefab.

    However, if I break the prefab's connection but keep the now unconnected object in my scene at the same point in the hierarchy as before, Unity loads without freezing at the next start. On the other hand, removing the prefab from the scene and creating a completely new one from scratch - a panel with nothing more on it than five labels - and turning that into another prefab again freezes Unity next time, so I suppose it's not a problem with the original prefab per se.

    Keeping the prefab from the scene and only adding it for editing is alright as a workaround for now, but I'd really like to understand what's going on here. I am not sure whether this is a problem with Unity or DFGUI, but I can PM you a link to an archive of my project with three scenes in it to have a look at it.
     
  16. jmatthews

    jmatthews

    Joined:
    Jul 27, 2011
    Posts:
    199
    Unless I'm missing something obvious it appears you can't easily use DFGUI to create in game healthbars and name plates that actually use world space. This is a pretty serious limitation for most non-trivial use cases and probably something you should disclose/rectify.
     
  17. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    noobs spoted !< where i take control of button in code ? for get all in one script
     
    Last edited: Jan 8, 2014
  18. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    I don't quite understand what you mean by "take control of". If you could please give me an example of what you mean, it would help.

    If you mean, how do you take an action when a button is clicked, there are a number of ways to do this. You can use Event Binding to call a function in one of your scripts, you can attach event handlers to the button's Click event directly, or you can write Unity-style event handlers that are called automatically. There's a section on event handling at the top of this page.
     
  19. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    Have you seen this demo? It can definitely be done, and we're working on streamlining the process as well.

    You can also easily display health bars and other items in screen space, as demonstrated here.

    Both approaches work well, but world-space controls are somewhat more involved to set up.
     
    Last edited: Jan 8, 2014
  20. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    so yes i look not understand ! you got not one full sample with all like easy touch is usefull
    or somethinks for like auto writhe this because on the way i prefere work with easy touch
    like this

    private void On_TouchStart( Gesture gesture ){

    if (gesture.pickObject != null ){

    if (gesture.pickObject.layer == 10)
    {
    Debug.Log("name"+gesture.pickObject.name);

    if (gesture.pickObject.name == "" ){

    Debug.Log("ok");
    }


    }


    }


    }

    if i understand is the same way but i must declarate all button ? is look little big for just one click
     
  21. jmatthews

    jmatthews

    Joined:
    Jul 27, 2011
    Posts:
    199
    I'd appreciate a link or any info on how one would set that scene up. To be clear, I love the screen space stuff you're doing, especially the event and property binding.

    Your GUI objects have to be under the GUI Root to render. So putting say, a label element on a world space game object won't work. You have property binding and tweens that can be added but you cant bind a Transform with your tweens. And you cant map a Transform property to your 2d interface.

    If you've addressed this elsewhere, my apologies, but I have researched it quite a bit and the consensus on your forums seems to be that you're working on it. Give me a lead and I'll do the work, I simply can't find a place to start on this.
     
  22. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    You can directly set the world position of a control. You could have a manager script which allows you to instantiate a label as a child of your UI, so your character might instantiate the label and then set the position of the label to a point above the character's head in LateUpdate (and then when the character dies, delete the label or recycle it, etc). That, or calculate the screen point and set the control's Position property.
    That's how I did things when I was still working with NGUI.
     
  23. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    There's a discussion of the topic in our support forums, which discusses the use of the dfFollowObject3D and dfReplaceGUICamera components, as well as any other considerations that need to be addressed.

    The next update will include a small sample scene demonstrating this as well.
     
  24. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,663
    Hey Takuan,
    hope you're feeling better. Afaik you were ill during the holidays?!

    I've send you an pm, but got no reply (don't worry, it's okay :D)... Maybe you didn't saw it so i'll post it here:
    Do you have any idea?

    Best regards,
    Mauri
     
  25. jmatthews

    jmatthews

    Joined:
    Jul 27, 2011
    Posts:
    199
    Got it, I read that thread and somehow it didn't click. Oddly, the library ships with a different "Follow" script than the one you use in your example but I've compared the two and see what you're doing. Apologies for not finding it on my own.
     
  26. c-Row

    c-Row

    Joined:
    Nov 10, 2009
    Posts:
    847
    Any ideas TakuanDaikon?
     
  27. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    Last edited: Jan 10, 2014
  28. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    There was a recent thread on this in the support forums also. There is a temporary workaround posted in that thread.

    This issue has been resolved in the dev branch, and the fix will be included in the next update. We hope to submit the next update to the Asset Store today.
     
  29. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    Any plans to introduce more explicit error messages on elements like property bindings? When something goes wrong rather than get any details I just get a generic "System.Reflection.TargetInvocationException" error and if I have dozens in the scene the only way to determine which is the problem is to disable them all and check them one at a time till I find the problem property binding. If it could capture the gameobject name that would help.

    Edit: I figured out that Z-Order determines the order of Tab Container pages though "Tab Index" kinda seems the more obvious choice. Guess I was missing this from the API doc: "Used to compare dfControl instances in order to sort them according to ZOrder value"
     
    Last edited: Jan 11, 2014
  30. c-Row

    c-Row

    Joined:
    Nov 10, 2009
    Posts:
    847
    Good to know. Guess I fed Google the wrong words then. :)
     
  31. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    on mobile interface look destroy

    $6hEpN.jpg

    it's possible to know any idea where's can from
    i change from ngui because he do same thinks
     
  32. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    Well I needed to upgrade because I was hitting those crash bugs and the newest version made my UI pink. I deleted the old asset directory before importing as indicated in upgrade notes. I can't get it to refresh. I did a 'rebuild' of my atlas, I forced a refresh of the UI root, I've restarted Unity, I've started up the game to see if it resolved on creation. Still pink.

    edit: looks like missing components are from event bindings. All instances in any of my scenes or prefabs can't find the new version. Using the missing component script I've resolved the error but I'm having to set them all up again.
     
    Last edited: Jan 17, 2014
  33. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    Did you delete the entire Asset directory, or just Assets/Daikon Forge? I really hope it was just Assets/Daikon Forge!

    The pink UI means that Unity can't find the Materials, or that something is wrong with the materials or shaders. Does this happen with everything, or is it just on some scenes? It might be useful to know if the examples that are included also show this problem. It might also be worthwhile to check the actual materials used and see if the correct Shader is assigned.

    If you have any warnings about missing scripts, this page has some instructions on how to resolve that issue.

    Expression binding is deprecated, but was not removed. The example scene was removed, but the plugin and components are still in place. Those will be removed eventually, but you can download the source code for the dfScriptLite.dll plugin, so it will remain available for those who want to use it.
     
  34. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    It's very hard to tell from that snapshot, but is it only the GUI that turns pink on mobile? It looks like other things are doing this as well. This could mean that the texture format isn't correct, or it could mean that the shader doesn't work on the mobile platform, or it could mean that the game couldn't find the shader. Moving the shaders to the Resources folder might help also.

    What mobile platform is your target?
     
    Last edited: Jan 17, 2014
  35. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    The update that was referred to is now released. I believe that this update will resolve those issues for you.
     
  36. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    We'll extend it to print out the name. One thing that we try to do with code like property bindings is provide the context to the Debug.Log() call so that you can click on the message in the console and it will highlight the correct game object for you.
     
  37. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    You can do this with tweens, although that could become unwieldy very quickly. I would suggest creating a custom script which tweens the color on various mouse events (that way you have a single component you can drop on a button and pick button colors).
     
  38. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    Daikon Forge directory :eek:

    It doesn't happen with the example but it happens with the UI I've created. It looks like the issue is that my my UI is always loaded in via prefabs and the prefabs aren't getting updated properly somehow. Sticking the prefabs in the scene, letting them get refreshed at runtime startup normally, and then stopping the scene and applying them back to the prefab seems to fix it.
     
  39. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    hard to say more at this time my application don't start again
    i'am on android

    so here i get dfCoverflow resest change list when is enable so index is always the same but icon change
    i have try
    if (onetime == false ){
    onetime = true;
    controls = new dfList<dfControl>( container.Controls );
    }
    but it's look not that's

    update : scroll not responding with touch any way to fix that's please is urgent è:)
     
    Last edited: Jan 20, 2014
  40. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    HI TakuanDaikon,

    I have a possible feature request. With the addition of Consume Mouse we are now able to detect when the mouse is over any given DF element. Inside the dfGUIManager.cs under OnGUI where this detection is taking place; the occluders array is storing the Rect information for all the DF elements. Can we get an option per element to override / exclude their inclusion into the Consume Mouse check. I have a need to be able to detect when the mouse is over certain DF elements but not others.

    My example is as such.
    Setup : I am using Consume Mouse to trigger a custom bool that will be set to true when the mouse is over any DF GUI elements. This is set by the dfGUIManager.OnGUI(); This bool is used to disable the display of certain GUI elements (B) under certain conditions (A).
    Part 1. (A) Main GUI tool bar that runs the bottom of the screen. When the mouse pointer is over this GUI the Consume Mouse does it's job and triggers the custom bool that disables the display of GUI element (B).
    Part 2. (B) Is a GUI box that displays information to the player and follows the mouse pointer until clicked and will stay on screen at the clicked position. At times the mouse is allowed to move over this GUI element which triggers the bool event mentioned above causing the GUI to disabling it's self. I would like this GUI element to be ignored by the Consume Mouse detection thus keeping the bool in a false state and the GUI active.

    If the control elements have their own option to ignore Consume Mouse by keeping their Rects information out of the occluders array I believe this would solve the issue.

    Thanks for your time
     
    Last edited: Jan 23, 2014
  41. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    I'm working on a fix for that, will post a workaround as soon as I can.
     
  42. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    It should be easy enough to add this. I haven't thought this through all the way (haven't had my morning coffee yet), but I wonder if it would make sense to use the IsInteractive flag for this purpose? That flag is already used to specify whether the control will respond to user input events, so it might make sense that it controls this behavior as well.

    If that's the case, then it could be as simple as changing dfGUIManager.getControlOccluder() to the following:
    Code (csharp):
    1. private Rect getControlOccluder( dfControl control ){
    2.  
    3.  
    4.     if( !control.IsInteractive )
    5.         return new Rect();
    6.  
    7.  
    8.     var screenRect = control.GetScreenRect();
    9.  
    10.  
    11.     var hotZoneSize = new Vector2(
    12.         screenRect.width * control.HotZoneScale.x,
    13.         screenRect.height * control.HotZoneScale.y
    14.     );
    15.  
    16.  
    17.     var difference = new Vector2(
    18.         hotZoneSize.x - screenRect.width,
    19.         hotZoneSize.y - screenRect.height
    20.     ) * 0.5f;
    21.  
    22.  
    23.     return new Rect(
    24.         screenRect.x - difference.x,
    25.         screenRect.y - difference.y,
    26.         hotZoneSize.x,
    27.         hotZoneSize.y
    28.     );
    29.  
    30.  
    31. }
    As I said, I haven't thought through all of the implications of this yet, but I do think it would be best to avoid adding new properties unless necessary.

    Feedback is welcome and encouraged :D
     
  43. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Perfect, this means I would simply set IsInteractive to be false on the elements that I want to ignore Consume Mouse.

    Thanks for the suggestion. I'm looking forward to giving this a try when I get home after work :)
     
  44. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    I got it working exactly like I was hoping to. Here is the new code. I just added in the !control.IsInteractive check at the top of the existing code. Now when a DF element is set to !Interactive it will be ignored.

    Code (csharp):
    1.  
    2. //dfGUIManager
    3.  
    4. private Rect getControlOccluder( dfControl control ){
    5.  
    6. if( !control.IsInteractive ){
    7.     return new Rect();
    8. }
    9.  
    10. Rect screenRect = control.GetScreenRect();
    11. Vector2 hotZoneSize = new Vector2(screenRect.width * control.HotZoneScale.x, screenRect.height * control.HotZoneScale.y);
    12. Vector2 difference = new Vector2(hotZoneSize.x - screenRect.width,hotZoneSize.y - screenRect.height) * 0.5f;
    13.  
    14. return new Rect(screenRect.x - difference.x,screenRect.y - difference.y, hotZoneSize.x, hotZoneSize.y);
    15. }
    Thank you for your help :)
     
  45. Dusho

    Dusho

    Joined:
    Jul 10, 2010
    Posts:
    22
    Hi. Link to free version from first post leads to main page, and I can't find free version for evaluation anywhere. Was it taken down? Thanks
     
  46. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    Someone reported that the download wasn't working properly, so I took it down to investigate. I'll try to get it back up as soon as possible.

    In the meantime, I'd like to take the opportunity to mention that Daikon Forge GUI is currently 65% off on the latest Asset Store Madness sale:

     
  47. domx

    domx

    Joined:
    Jul 23, 2013
    Posts:
    6
    Any idea how long will it be available on sale? Cheers!
     
  48. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    Looks like it will be on sale until the 15th, for a total of eleven days.
     
  49. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    760
    YAY!!! I really want to buy but I'm waiting for money to transfer into my paypal account lol. Glad I won't miss the sale!
     
  50. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    Daikon Forge GUI looks great, but I have a few concerns that I would like to clarify before purchasing:

    It looks like the DFGUI scripts are not in the "/Plugins" directory. Is this correct? Then doesn't dfgui have to be recompiled every time I modify one of my scripts? If so, how long does it take to compile all of the dfgui scripts?

    Thanks