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

Making an animated 3D UI warning

Warnings in games can be provided in many ways, for doing both the right and wrong things. However, having the option of 3D capabilities allows us to create more interesting and dynamic warning messages.

How to do it...

  1. To begin, let's create our warning in the UI. We can start by adding a panel. Right-click on the Hierarchy panel, then go to UI | Panel and rename it as 3DWarning. We can continue to add other UI elements, so we want a title inside another panel to evidence it and maybe add some text. As best practice, every time you add a component, tweak its anchor points as well so that everything can scale properly. At the end, we should have something that looks like this:
  2. Now, we should take advantage of the ...

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