Reproduction Steps
Steps (done in a script attached)
- Call ContentProvider:PreloadAsync({assetId})
- Set image label image to asset id
- Set image label visible to true
- Expected result: Image is preloaded, there is no white background or flash, the method yields until loaded
-
Actual result: Image is not preloaded,
IsLoaded
property is false
Video of result, see flash:
ContentProvider_PreloadAsync_DoesNotWork.rbxl (35.1 KB)
NOTE: You need a new image each time you do this, one from the website, NOT from studio, otherwise images will be in the cache. Alternatively, you can clear the cache to reproduce this.
However, preloading works for animations and sounds.
Reproduction / system info
Note that your cache must be clean for this to reproduce (obviously once it’s loaded, preloading doesn’t do anything).
- Happens on Windows 11
- Happens in Studio and Game
- Intel i5-8600 3.60 Ghz, GTX-1080
- Happens on multiple people’s computers
Why this is important to fix
This is very important because many first-time experiences for users includes images for buttons, tutorial information, and more. Without these images rendering, it can be very hard to draw the eye to the correct instance, and ensure that first-time user experience is good.
Expected Behavior
- ContentProvider:PreloadAsync() yields until all images are loaded
- Images in image labels set to those images’ will be shown immediately
Actual Behavior
The image does not preload. See above.
Workaround
You can create image labels, and parent them, and then listen to IsLoaded event. However, this is probably a bad way to preload images. Also, it will not work as well with textures in the world space.
Issue Area: Engine
Issue Type: Other
Impact: Moderate
Frequency: Constantly
Date First Experienced: 2022-01-20 00:01:00 (-08:00)
Date Last Experienced: 2022-01-20 00:01:00 (-08:00)