Expanding the project with multiple planets
To add another planet to the project, we need to add its planet card image to the Reference Image Library, create its planet prefab, including a material for rendering the planet skin, and add the reference to the planetPrefabs
list in PlanetsMainMode
. Then, we'll update the script to handle tracking multiple planets. Let's walk through the steps for adding Mars.
Adding the planet card image to the Reference Image Library
Perform the following steps to add Mars to our Reference Image Library:
- Locate and select your ReferenceImgeLibrary asset in the Project window. (If you've been following along, then it should be located in the
Image Library/
folder.) - In its Inspector window, click Add Image.
- Locate and drag the
Mars-MarkerCard
image from the Project window and drop it onto the empty image Texture slot in the Inspector window. - Check the Specify Size checkbox and enter the same Physical Size | X value...