Squid.Unity Open Beta announced: http://forum.unity3d.com/threads/159306-SQUID-Beta-GUI-System
Hello fellow Unity nerds,
i’m Chris, the developer of SQUID (http://www.ionstar.org/?p=111).
Squid is an engine agnostic GUI library for realtime 2D/3D applications with a truckload of features.
Squid is blazingly fast: it draws the whole GUI in a single draw call, if you merged your textures the right way.
We have just successfully tested Squid running in Unity, on several platforms (Windows, Mac, IOS)
and are now contemplating the idea to put it on the Asset store.
Since Unity 3.5 is supposed to bring a completely new built-in GUI, but there is no more information about it since, i’m wondering how much interest there is in the community for another (really feature rich, fast and stable) GUI solution.
Screenshot of Squid example skin and layout:
A little feature overview:
- Fully skinnable (you can even switch between different skins at runtime)
- Scale9 texture slicing. (yes you can have pixel perfect round corners without distortion)
- Retained mode (Unity GUI is immediate. Squid is retained. Think Windows.Forms)
- Docking, Anchoring with Margin and Padding
- Hierarchical opacity, Z-Ordering, Scissoring (no hardware scissor, no render state changes)
- Custom mouse cursors (can be animated too)
- Tooltips, Dropdowns, Modality Queue (modal dialogs and dropdowns)
- Full control over rendering. Full control over scissoring and batching.
- BBCode markup support including clickable links (Squid.Label)
- Supports arbitrary control shapes via texture masking (8bit collision mask)
- Fully interactable in 3D (slap a GUI on any mesh and interact with it)
- Easily extendable. Squid was specifically designed to be an SDK. That means you can easily create your own custom controls.
- built-in animation system using coroutines/fibers. same pattern as in unity. see code example below.
What does retained mode mean?
I noticed some confusion about the term “retained mode” on these forums and i think it’s helpful to make this a bit clearer.
Retained mode does not mean there is only 1 draw call. It also does not mean the GUI uses a “dirty rect” pattern to only draw recently changed parts of your GUI.
Ok, so what is retained mode?
The terms immediate and retained do NOT describe how the GUI is drawn, but how you interact with it in code. In an immediate system, you get immediate response from a button (bool result = GUI.Button). In a retained system, the button is created once and remains in the object model until chose to remove it. Interaction is handled via events and delegates.
Even in an immediate system the actual drawing is deferred until the very end of your GUI instructions. This makes a lot of sense, because you still want to be able to batch, use software or hardware scissor and possibly crank everything into a single draw call.
Restrictions:
It is not possible to rotate GUI elements. In Squid, each and every GUI element is a rectangle, but don’t fret, they can still have any shape you like. Defined by your textures and collision masking.
Things to come:
I’m happy to announce that Squid will come with a full WYSIWYG editor inside Unity!
No external tools! You select your GameObject and start designing your GUI right in the scene view. More about this later - i’ll provide some screenshots and maybe a video asap.
A simplified code example:
private Desktop MyDesktop;
private Button MyButton;
void Start()
{
MyButton = new Button();
MyButton.Size = new Point(100, 20);
MyButton.Position = new Point (100, 100);
// MyButton.OnMouseClick += delegate(Control sender) { do something };
MyDesktop = new Desktop();
MyDesktop.Size = new Size(800, 600);
MyDesktop.Controls.Add(MyButton);
// use animation (milliseconds)
MyButton.Animation.Size(new Point(100, 100), 500);
// use custom animation routines
MyButton.Animation.Animate(IEnumerator myRoutine);
}
void OnPostRender()
{
MyDesktop.Update();
MyDesktop.Render();
// all rendering will now be routed through GuiRenderer.cs
// you dont have to touch a single line of code to integrate it.
}
I would appreciate any type of feedback and be happy to answer all questions.
Thanks for your time and opinions,
Chris
P.S.: My apologies to the iGUI folks. The poll should say “iGUI”, not “oGUI”.
