In Chapter 2, Canvases, Panels, and Basic Layouts, we discussed the three different Rendering Modes you can assign to a Canvas. We’ve used Screen Space-Overlay and Screen Space-Camera, but haven't used World Space yet. As described in Chapter 2, Canvases, Panels, and Basic Layouts, UI rendered in World Space is placed directly in the scene. We've already discussed the properties of the World Space Canvas rendering, so this chapter will just look at when to use it and examples of implementation.
In this chapter, we will discuss the following topics:
- When to use World Space UI
- General techniques to consider when working with World Space UI
- Using World Space Canvases in a 2D game to create status indicators positioned relative to characters
- Using World Space Canvases to create health bars that hover over enemies' heads in a 3D game