Creating a starry sky in Unity. Part3 - Showing constellations

Have you ever looked up at the stars and thought, that’s cool I wonder if I can do this in Unity? Well have no fear this three-part tutorial has you covered. This third part focuses on extending our scene by adding the ability to toggle on and off lines to represent some constellations. We work in three stages. First, creating list of the stars that form the constellations and which pairs need a line drawing between them. Then we colour the stars white when we toggle them on, and return them back to the original colour when we toggle them off. Finally, we use LineRenderer components to draw the lines between the stars - making sure that the lines don’t occlude the stars to give a good effect. The key aspects of this episode are modifing the colours of materials, lists of tuples, adding line renderers at runtime and adding an appropriate material with shader. Yale bright star catalog: Digit
Back to Top