Creating and placing a 3D UI

Traditionally, UIs are static and are bound to the x and y axes. However, 3D UIs are more dynamic. As such, it is necessary to consider the placement of 3D UIs. In this recipe, you will learn how to place a 3D UI.

How to do it...

  1. To begin, we need to create Canvas. We can do this by adding any UI element to the scene, as we have done many times during this book so far, or we can add it directly by right-clicking on the Hierarchy panel and then going to UI | Canvas.
  2. Next, select Canvas in the Hierarchy panel, and in the Inspector, change Render Mode to World Space. Setting the Canvas to the World Space mode means that it is positioned in the space and it can be viewed from all the cameras within the world, provided they ...

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.