Search Unity

Demo : CEGUI in Unity

Discussion in 'Immediate Mode GUI (IMGUI)' started by Slan, Jun 11, 2010.

  1. Slan

    Slan

    Joined:
    Jun 11, 2010
    Posts:
    8
    Hacking my way through the existing (but inactive for two years) C# port of CEGUI, I've assembled a small demo inside Unity.

    The existing code is obviously old and is only a partial port of version 0.5.0 but if anyone is interested, I'd be more than happy to share what I have.

    The layout is done in code atm, although having it data-driven is my next goal.

    Instructions: Create a project, unzip content, attach BasicDemo.cs to MainCamera and hit Play.

    Hello world screenshot: http://img251.imageshack.us/img251/7545/ceguiunity.jpg
     

    Attached Files:

  2. Nicon

    Nicon

    Joined:
    May 25, 2010
    Posts:
    14
    I will have a go at it and let you know how it works on my end. Hope to see some more progress on this in the future.
     
  3. Slan

    Slan

    Joined:
    Jun 11, 2010
    Posts:
    8
    Code is updated (and available on request). Layouts are read from XML now, see the screenshot for side-by-side layout / display.

    http://img689.imageshack.us/img689/337/ceguiunity.png

    One interesting feature is that plumbing code is very limited thanks to automatic event wiring and .Net attributes (see XML line 31).

    Code (csharp):
    1.  
    2.     [GuiEvent]
    3.     public void OnButtonClicked(object sender, GuiEventArgs e)
    4.     {
    5.     }
    6.  
     
  4. liverolA

    liverolA

    Joined:
    Feb 10, 2009
    Posts:
    347
    cool,any updates?
     
  5. Slan

    Slan

    Joined:
    Jun 11, 2010
    Posts:
    8
    Not much. Been playing with CEGUIEditor to visually edit layouts but this requires a lot of work on the current code (schemes / looknfeel are far from complete).

    To be honest, I'm now waiting to get my hands on Unity3 because the old mono becomes a showstopper for real progress on this project. Plus I need more visibility on the future of UnityGUI... no need to reinvent the wheel here: I have enough to do on the game I'm working on at the moment.

    Anyway, I've setup a project on sourceforge if you wanna get a look at the code (not for the faint of heart).
     
  6. liverolA

    liverolA

    Joined:
    Feb 10, 2009
    Posts:
    347
    i think you can make this soultion to be a commercial one,i d' love to pay for the nice plugin because it fills the gap(u3d has no better ui soution).

    thanks for share, any way!!
     
  7. Sammual

    Sammual

    Joined:
    Oct 28, 2008
    Posts:
    176
    Any updates on this?
     
  8. Slan

    Slan

    Joined:
    Jun 11, 2010
    Posts:
    8
    Nope. I finally decided to do all interfaces the Unity way (mixing GUI and GUILayout where appropriate). I can't express how painfull it was since we need support for all screen sizes and aspect ratio (replacing fonts in existing skins at runtime, anyone?) but in the end we had the job done.

    I definitely see a raison d'être for such a project, at least from an architecture / external definition perspective. It's just that my schedule is tight and I still have to close the gap between beta and gold on the game I'm working on.
     
  9. NomadMellock

    NomadMellock

    Joined:
    Sep 28, 2010
    Posts:
    5
    This would be real nice if it was updated to Unity 3, works great in Unity 2.6
    I've been looking into the code which was so kindly posted (Thank You) however,
    I can't see what is required to update it to Unity 3 just yet.

    Failing this i think i will be using EZGUI and create a few more controls manually.
     
  10. cemC

    cemC

    Joined:
    Dec 23, 2010
    Posts:
    214
    this is not work on Unity 3.1
     
    Last edited: Feb 24, 2011
  11. minevr

    minevr

    Joined:
    Mar 4, 2008
    Posts:
    1,018
    Can't support Unity for Mac?