O'Reilly logo

Unity UI Cookbook by Francesco Sapio

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating an extendable and rotating element with a final fade effect

In this recipe, you will learn how to create an extendable and rotating UI element with a final fade effect. This recipe is an extension of the previous one. In fact, we will add some controllers to the rotation. By extending the script that we made in the previous recipe, we can create more complex decorating elements for our UIs.

How to do it...

  1. To begin, we need to create a UI element. In this example, we will use a square, but you can also use any other image, such as a decorative star or a circle. To do this, create the UI element, right-click on the Hierarchy panel, and then navigate to UI | Image. Finally, rename it Extendable and Rotating Element. Of course, it is also ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required