In this step, you add a reticle to the camera.
For other steps in this exercise, see Exercise 4: Add Functionality.
To add a reticle to the camera:
- From the Hierarchy view, select Create > 2D Object > Sprite.
- Drag the New Sprite object onto the Main Camera object to nest the sprite.
- From the Inspector view, change the name of the sprite to Reticle.
- From the Transform component, click the Gear icon and select Reset.
- From the Project view, open the /Assets/Workshop/Textures folder and drag the Reticle file into the Sprite Renderer > Sprite field in the Inspector view.
- From the Transform component, change the Position property's Z value to 5. The reticle should be placed directly in front of the slideshow button.
- Change the Scale property's X, Y, and Z values to 0.1.
- Click the Add Component button and select Scripts > Reticle. This will use the position of the reticle to direct the trajectory of the ray.
- From the Reticle component, set the Pressed Color property to green.
- Click the Play button to preview the scene. You should be able to see the white reticle displayed in front of the slideshow button.
- Click the Play button again to stop the preview.