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

GUI-eXtended 1.x is now Open-Source!

Discussion in 'Made With Unity' started by jeremyace, Jan 11, 2012.

  1. jeremyace

    jeremyace

    Joined:
    Oct 12, 2005
    Posts:
    1,661
    Hi fellow Unity users,

    These are exciting times for Unity developers! Unity keeps getting better and better and, as you know, Unity Technologies have announced that they are bundling a new UI system with a visual designer soon. While this addition won't make the 3.5 release, they have assured us it is coming soon.

    With this advance of the Unity toolset, 3rd party UI tools such as GUIX will no longer be as widely needed.

    We have given this change a lot of thought, and we want to support our customers and the Unity community the best way we can. So we have decided to Open Source the entire GUIX system (including the visual designer) under the terms of the very open MIT License!

    We have removed the DRM, and uploaded the package (including our build scripts) to bitbucket. The latest GUIX build is available there, and we have included the latest dlls already built in case you don't want to build it yourself right away.

    We hope this change gives you more freedom and flexibility as you create your masterpieces. Thanks to all our supporters, and we hope you all enjoy this release.

    You can get the source code here:
    https://bitbucket.org/JeremyHollingsworth/gui-extended_opensource

    Take care,
    -Jeremy
     
  2. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,663
    I remember there was a demo of it, when it was commercial. Very nice tool. I pretty liked it. :) But it was too expensive for me.
    Now it's free/open source. At the one side it's cool but at the other it's also a shame that this has comes to this end.

    Are there any new functions/things available in the tool?
     
  3. AFrisby

    AFrisby

    Joined:
    Apr 14, 2010
    Posts:
    223
    Very cool, thankyou!
     
  4. jeremyace

    jeremyace

    Joined:
    Oct 12, 2005
    Posts:
    1,661
    Sorry, I missed your question for some reason. ;-)

    This release is the latest version of GUIX. I am not sure which version you have seen, so I can't tell you what is new. The release notes are included in the download, and the API reference (also in the download) is very complete. Either of those should hopefully answer your question.

    Take care!
    -Jeremy
     
  5. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,663
    Hey, no problem :)

    Me either. Argh, my fault. Sorry :( I'll gonna check this out when i have time :)


    Friendly greetings and have a nice day,
    Maurice
     
  6. techmage

    techmage

    Joined:
    Oct 31, 2009
    Posts:
    2,133
    How does this system work? Does it generate code for OnGUI? Or do something else?
     
  7. jeremyace

    jeremyace

    Joined:
    Oct 12, 2005
    Posts:
    1,661
    It has a runtime (works in webplayer) that provides the UI Elements. These Elements are represented as classes (objects) so that they store their own state data, have a uniform and clean API, etc.

    The Elements are usually rendered by being added to what GUIX calls a Canvas. The documentation included with the source will fill in what I left out. Also check the Unity projects provided in the package for a working example.

    The visual Designer generates Canvas and Logic code files (JavaScript or C#), but because of the design, generated Canvases can be re-loaded for additional changes. Code generation is usually one-way, but not in this case. ;-)

    At its core it calls into Unity's GUI to render the Elements, but that could be changed out for a custom system.

    Hope that helps,
    -Jeremy
     
  8. gekido

    gekido

    Joined:
    May 11, 2011
    Posts:
    13
    Awesome contribution - this is exactly what Unity desperately needs - a nice intuitive designer for interface elements.

    The build process took a bit to setup, but went relatively smoothly. Wasn't sure if it was supposed to make a package for me, but simply loading up the package project and exporting it worked well - integration into my test project worked fine.

    For those that are interested, here is a C# version of the 'showcanvas.js' script that is included with the project - was pretty straightforward to convert it, but just in case anyone wants it:

    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class ShowCanvas : MonoBehaviour
    5. {
    6.     public static GUISkin _mySkin;
    7.     public SampleCanvas canvas;
    8.    
    9.     void Awake ()
    10.     {
    11.         canvas = new SampleCanvas();
    12.        
    13.         if( _mySkin != null )
    14.         {
    15.             canvas.Skin = _mySkin;
    16.         }
    17.     }
    18.    
    19.     // Update is called once per frame
    20.     void Update ()
    21.     {
    22.         // Set the Progress Bar's value just for fun
    23.         canvas.ProgressBar.Value += 10.0f * (float)Time.deltaTime;
    24.        
    25.          //Check if we maxed out the bar, and if so, start again at 0 %
    26.         if ( Mathf.Approximately( canvas.ProgressBar.Value, 100.0f ) )
    27.         {
    28.           canvas.ProgressBar.Value = 0.0f;
    29.         }
    30.     }
    31.    
    32.     void OnGUI()
    33.     {
    34.         canvas.Draw(); 
    35.     }
    36. }
    37.  
    Again, awesome contribution - many thanx!
     
  9. psychicparrot

    psychicparrot

    Joined:
    Dec 10, 2007
    Posts:
    884
    Thanks for this, Jeremy - excellent stuff! A very welcome contribution to the community :)
     
  10. fallingbrickwork

    fallingbrickwork

    Joined:
    Mar 16, 2009
    Posts:
    1,072
    Yes, excellent stuff indeed. Many thanks for this community contribution.

    - Matt.
     
  11. jeremyace

    jeremyace

    Joined:
    Oct 12, 2005
    Posts:
    1,661
    No problem guys.

    gekido: Glad you got it building. I thought about having it export the packages automatically, but since we had to do two builds for each release (2.6.1 and 3.x) due to Unity API changes, I had to manually export it from 2.6 anyway. Figured since I was testing it via those projects it was quick enough to export the packages while I was at it. ;-)

    You just need the runtime DLL and the GUIXDesigner editor folder anyway, as you know.

    Take care,
    -Jeremy