Quickly cycle through a series of images
I want to quickly cycle through a large number of simple images, somewhere in the region of 500. I'm aiming for showing a new random image at the rate of 3 or 4 per second. The images are simply a random positioning of dots and I'm trying to create something similar to a white noise effect. This will have to run on a tablet device so I'm looking for an efficient way to store and show the images in quick succession.
Can anyone suggest the best approach to implement this?
Answer by Dray · Jan 22, 2018 at 02:37 PM
Pack your textures into an texture atlas and animate it by moving the atlas texture around.
(Look at this random example atlas I copied from google):
You could also generate the texture "live" on the device using an actual noise implementation, I think 0,25 - 0,33 seconds are enough to generate a noise texture on a tablet nowdays
Np :) let me know if you run into issues, I might even have an old implementation I can dig out later.. hopefully :D
Answer by Neamtzu · Jan 22, 2018 at 02:29 PM
Add all your images in Resources folder and load them using Resources.Load at runtime. After you load a new image, unload the old on from RAM using Resources.UnloadUnusedAssets. If Resources.Load is causing frame drops, you can try to load the new image using Resources.LoadAsync
https://unity3d.com/fr/learn/tutorials/temas/best-practices/resources-folder
Don't use it.2.1. Best Practices for the Resources System
In this case I don't see a reason why not to use the Resources System.
Check 2.2. Proper uses of the Resources system of the provided link.
Thanks, this sounds like the easiest approach but I'm worried about performance.
Your answer
Follow this Question
Related Questions
GUI Texture slide down || Clipping mask. 0 Answers
The interface shows lines On iPhone`s 6 and 7 1 Answer
Render to texture Artifacts 1 Answer
images bad quality after build ! 1 Answer