Making UI elements affected by different lights
To give a professional touch to our user interface, we can add lights to it. This could be effective if we want to create a specific type of atmosphere or emphasize an element. In fact, Unity allows us to alter UI elements by light. In this recipe, you will learn how to create two UI elements and, using layers, how to have them affected by different lights. In order to do this, we will add two new layers, create a new UI material, and of course play with lights.
How to do it...
We need to create two panels that are slightly separated, as shown in the following screenshot. From this, you can learn how to affect different UI elements with different lights. To create the panels, right-click on the Hierarchy panel and then click on UI | Panel. Furthermore, to be more ordered, we can rename them as Panel01 (the one on the left) and Panel02 (the one on the right).
Now, we have to change the render mode of our canvas. Hence, select it from the Hierarchy...