UI Example Project

Hi, if you are looking for the UI example project for the UI public beta then you have come to the right place.

This project contains a number of examples showing how to use some of the fundamental building blocks of the system, but it is by far not an exhaustive example of what can be done!

You can find the project on the Asset Store here:

There are a number of scenes:

  • Controls - shows some of the standard controls that come with the UI system.

  • Drag And drop - How to implement a drag and drop handler.

  • Draggable Panel - How to implement a simple draggable and resizable window.

  • Layout Groups - Example of using the auto layout system with nested layout groups and a grid.

  • Lighting - Examples of UI affected by lighting in the scene.

  • Menu 3D - How to have a 3d UI with perspective that uses Mecanim for the buttons.

  • Render Texture - How to use render textures for UI elements.

You can find the project for beta and release candidate versions of 4.6 here:
Beta 17: https://oc.unity3d.com/public.php?service=files&t=3df3567b33718c5ffdfe804691ed0e97&download
Beta 20: https://oc.unity3d.com/public.php?service=files&t=1f68bffd6d9a921b2ead6013c3135556&download
Beta 21: https://oc.unity3d.com/public.php?service=files&t=e219928abaa63e60884aba862645b8a9&download
RC 1: https://oc.unity3d.com/public.php?service=files&t=9d2a4b547862df12cfe0c21c2b461456&download
RC 2: https://oc.unity3d.com/public.php?service=files&t=b35741c9d9b7c81bfdcf1b326fff4086&download
RC 3: https://oc.unity3d.com/public.php?service=files&t=d200eb8bd06796705fd505e15b54f897&download

17 Likes

Thanks =)

How can I install 4.6 beta with 4.5.3 on the same computer on the same drive on Mac OS X 10.9.4?
Thanks

http://docs.unity3d.com/Manual/InstallingMultipleVersionsofUnity.html

In your applications folder change the “unity” folder name to “Unity (version number)” then install the beta, it will create another folder called “unity” and change that one to whatever version number.

You can have as many versions as you like, like this: Screenshot - af49e31ddbc05a6c02c206864e7a6cfa - Gyazo

1 Like

Thank you

new ugi just awesome…

Does the project include Mobile Touch support?

Your first touch (Input.GetTouch(0)) is mapped to the left mouse click (Input.GetMouseButtonDown(0)). So yes, should be fine.

Very helpful resources, thank you !

Very well done, the new UI system looks fantastic! Great job :slight_smile:

I just tested out the example project with 4.6 Beta and it seems that most of the controls do not work when using the web player. Is that a known issue? When i tested it out on a desktop Windows build everything worked.

Thank you for this, I just stripped down the project to the horizontal sliders and made some status bar stuff here:
The project was very helpful. Going to try to make my own bar graphics in PS later.

and scoobydoobd i had issues with the webplayer build myself, i think it’s just a beta thing.

1 Like

How i can add textfield with UI?

I messed with the drag and drop scripts and ended up with this:

Thanks for the awesome UI system!

7 Likes

Cool example. That would be an awesome example project :slight_smile:

While at drag n drop. It would be cool when Unity would allow drag n drop of external files …

Thanks a lot!

Sir, How can I use Button.onClick In “if ()”

Assets/Scripts/DragMe.cs(6,38): error CS0246: The type or namespace name `IBeginDragHandler’ could not be found. Are you missing a using directive or an assembly reference?

Assets/Scripts/DragMe.cs(6,71): error CS0246: The type or namespace name `IEndDragHandler’ could not be found. Are you missing a using directive or an assembly reference?

Do you have ‘using UnityEngine.EventSystems;’ at the top of your file?