Creating a slide shower using a discrete slider
Here, we can go further in providing additional customization for the player. In this case, we are going to implement a slide shower. The player will be able to scroll between pictures using a slider. To achieve this, we will see how to write a script to run this system. Again, we will use the events from the Slider (Script) component.
- To begin, we need to create our slider, which will be the controller of the player, so let's right-click on the Hierarchy panel and then go to UI | Slider. Finally, rename it to SlideShowerSlider.
- Then, select the slider and, in the Inspector, navigate to Add Component | New Script. Name it to SlideShowerScript and then click on Create and Add.
- Now, double-click ...