A variant of the visor HUD that is essential in first-person shooter games is a reticle or crosshair cursor. The analogy here is that you're looking through a gun-sight or an eyepiece (rather than a visor) and your head movement is moving in unison with the gun or turret itself. You can do this with a regular game object (for example, Quad + texture image), but this chapter is about UI. So, let's use our canvas, as follows:
- Find your Main Camera object in the Hierarchy panel as we did previously.
- From the Project panel, drag the DefaultCanvas prefab onto the camera object so that it becomes a child of the camera. Name it ReticleCursor.
- Set the Rect Transform component's Pos X, Pos Y, Pos Z to (0, 0, 1).
- Delete its child objects: Image and Text. This will break the prefab association; that's OK.
- Add a raw image child by selecting it from...