In this step, you add TextureCycler script to change the texture of a specific game or app object.
For other steps in this exercise, see Exercise 4: Add Functionality.
To add TextureCycler script:
- From the Hierarchy view, select the AppManager object.
- From the Inspector view, go to the Application Manager component and expand the Texture Object branch. The Texture Object property tells the system to change the texture of a specific game or app object. In this case, we want the texture of the Sphere_Inv object to change every time a button is pressed.
- From the Hierarchy view, drag the Sphere_Inv game object onto the Element 0 field.
- From the Hierarchy view, select the Sphere_Inv object.
- From the Inspector view, click the Add Component button and select Scripts > Texture Cycler. This will tell the app the starting texture for the Main scene and also sets a duration for each texture if the slideshow button is triggered.