"Organic" GUI Layout C#


I want to make a GUI which looks a bit organic or more flexible.

I have my 3D level and around it a Gui level for my buttons and so on. Because it looks not really nice like that I want to give my GUI Areas a special background (f.e. a color or a texture) so that it looks similar to the sketch.
Now I want to know if there is a better way to do this. f.e. is it possible to create a mask for the camera so that the view of my scene is limited?

I also would like to know if it is even possible to order the buttons more flexible (as in sketch2).

Can anyone please give me any advice? Thank you in advance.

Using GUISkin you can change the appearance of all your GUI objects.
You create as many different skins you need and you apply them to your GUI objects as you see fit.

Good luck!

Unity’s GUI system only works with rectangles. They can be rotated, but that’s all. Also if you plan to rotate and GUI element you wouldn’t use GUILayout since the rotation is not taken into account during layouting.

However you can still use parts of the GUI system for arbitrary shaped buttons. The textures will still be rectangular (of course they are always…) and you would not use the built-in GUI elements (like Button, Toogle) but create your own ones. You have to implement your own Hit-detection on a per-pixel base. You can use Texture2D.GetPixel for that. Overlapping of the Rects shouldn’t be a problem when the actual hit area doesn’t overlap.

However using actual geometry allows a much more flexible approach. It also allows the usage of different shaders and actual 3D effects.

Personally i wouldn’t use the GUI system in this case.

NGUI is a lifesaver for most people that come across it. It can do most of the things you are asking for very easily and efficiently. It is on the asset store for $95 I think but there is also a free evaluation version from the developer. Until the new GUI system from Unity is released for 4.x I think NGUI is your best bet.