Making a floating UI element
In this recipe, you will learn how to make a floating UI element. This is a nice effect to use within every kind of user interface. If you are going to use a very slow movement with a small amplitude, you can use this effect even on menus to give them more life and a professional look. A floating element can add yet another type of dynamic element to the UI, ultimately breaking the usually rigid nature that UI elements tend to have.
How to do it...
- First of all, we need to create an UI element. In this example, we will create a panel that can be the background of a menu. To do this, right-click on the Hierarchy panel and then navigate to UI | Panel. Finally, rename it Floating Panel. Of course, it is possible to resize ...
Get Unity UI Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.