Skip to main content

Ready to market your stellar app?

Samsung Developer Program is your gateway to app monetization success.

Learn More

Samsung Developer Program

Step 8: Create the TextureLoader Object


In this step, you create a TextureLoader object that specifies the textures to be loaded.

For other steps in this exercise, see Exercise 4: Add Functionality.


To create the TextureLoader object: 

  1. From the Hierarchy view, select Create > Create Empty.


  1. From the Inspector view, change the name of the empty object to TextureLoader. The object will tell the system what textures to load onto the AppManager Texture Object (in this case, we are using the Sphere_Inv object). 


  1. Click the Add Component button and select Scripts > Texture Loader


  1. From the Texture Loader component, expand the MStarting Textures section. When the texture on the App Manager Texture Object is ready to change, this script will first run through the MStarting Textures (by default, the Size is set to 1). After running through the textures specified in the MStarting Textures, the Texture Loader will begin loading the PNG and JPG files located in the MLocal Storage Dir Path. 


  1. From the MStarting Textures section, change the Size property value to 3.


  1. From the Project view, open the /Assets/Workshop/Textures folder. Here you will see a series of images with the 360_ prefix (e.g., 360_BritishColumbia.jpg). Choose three of these images and drag them into the three Element property fields.


  1. In the Texture Loader branch, locate the MLocal Storage Dir Path field and type the path below, exactly as shown. This will set a location for the app to look for additional 360° images on your device, if available. In this case, the app will look for a folder called "Workshop" in the root directory of your device.


NOTE: You will need to add the Workshop folder to your device in order for this feature to work. You can do this by opening the My Files app on your device, tapping Device storage > Menu > Create folder and adding the Workshop folder. If you have 360° images you want to view in this app, just add them to this folder, and the app will automatically pull them in.


  1. Save the scene.


  • Was this article helpful?