OpenGUI: Open source GUI framework for Unity

Open source GUI framework for Unity

LATEST RELEASE
(check this link often if you want the latest features)

FAQ
Documentation, tutorials and useful scripts
Issue tracker
Example project
GitHub repo

HEADS UP!
v0.9-beta-23: OpenGUI now supports dynamic content scaling. Details in the wiki

v0.9-beta-19: A new “size” parameter on the OGFont class will require you to update your fonts. Details in the wiki

v0.9-beta-12: Improvements to widget selection in edit mode. You can now shift click to select multiple widgets. Selection is now also dependent on the draw order rather than z position.

Participate

Disclaimer
Although OpenGUI is being improved upon regularly, it does still have some rough edges. It probably won’t turn your computer into a suicidal toaster, but there are no guarantees.

Web demo

8 Likes

hi,
i like the open source approach and the demo looks good. When I run the demo in unity everything is like expected in play mode but I can’t see the elements in edit mode. Shouldn’t they be visible?

I should mention that it’ll still be in the game view. Maybe that’s the problem?

Uploaded changes for touch support in OGScrollView and changed coordinates to Matrix4x4, so rotation is possible

thanks for the reply. Would it be possible to add the possibility to view it in edit mode? Would speed up the development!

This is nice, still checking it out.

@The Ghost: Thanks, let me know if there are any problems

@dev_peter: It does work in edit mode, it’s just displayed in the game view. Unfortunately the edit view is off limits for OnGUI draw calls. What you can do is accommodate for it with an appropriate layout for GUI editing. This is the one I am using:

Added component menus and tabs

ah ok, thats fine! I’ll tried it but couldn’t see anything :slight_smile: But I’m sure I did something wrong. Will try it again late. How are you dealing with mobile devices and different screensizes?

All widget types inherit the same master class OGWidget, which has the “stretch” and “anchor” subclasses. With those you can position and resize any widget according to screen size with a “factor” property (for instance, set that to 0.5 and the widget only stretches to half the screen size). There is also a manual offset so you can stretch them to be something like the screen size minus 20 pixels/world units. That is basically all you need to accommodate for multiple screen sizes and ratios.

I updated the original post with a link to a quick API reference i just did. It’s not totally there yet, but it covers the basics.

Thank you for great and easy to use framework! There is C# version 1357134–67275–$OpenGUI.zip (14.2 KB)

This looks really good! First thing I am going to do after getting back from school is install this.

+1 to you.

Hey this is pretty neat GUI

You can copy text line carriage returns from notepad and they will appear with with carriage returns. This seems to work for text-fields.
Haven’t used any scripting yet to make changes. But should be fun.

cheers!!!

:wink:

Oh wow! I haven’t been back here for a while, I’ve been making updates to the code, but I didn’t think anyone was interested in it. When I am done with the features I think are missing from this (which is not a tremendous amount, but still quite a bit), I should merge it with your C# version.

Thanks for the interest! :slight_smile:

EDIT: Latest package uploaded here.

Pretty sweet! Thanks mrzapp.

I’ve been spending some time starting this framework again from scratch (while trying to maintain backward compatibility).
The reason is that I wanted to reduce draw calls and start moving away form the native GUI system and onto the low-level GL library, as OnGUI will inevitably be discarded at some point.

Changes

  • Atlases (meaning all textures are drawn with the same draw call!)
  • Complete rewrite, meaning more stability
  • Custom inspectors to facilitate making skins

To do

  • Scroll views don’t clip the child objects very well yet.
  • All text is still truetype, so a draw call each. ( fixed! )

I’m pretty hyped about this, because when I get the bitmap text going, this will essentially be a single drawcall GUI \o/

If anyone wants to help me test this out, the code with example project can be cloned from the GitHub page. It’s in the “testing” folder.

Hi mrzapp.

It looks very interesting.

But I fear we cannot use your gui beacause you have it under gpl license.

There we go, changed to Creative Commons Attribution 4.0 International :slight_smile: I’ll try to keep the 1.0 version backward compatible, but be prepared to make some changes, as there will be a new skinning system and a select few variable deprecations.

mrzapp: How goes the rewrite? I don’t need an AI immeadiately , so I figure I might as well wait for the new version.

cheers, gryff :slight_smile: