ContentProvider:PreloadAsync() does not preload image or texture assets in either assetId form or instance form (appears to be a regression)

Reproduction Steps

Steps (done in a script attached)

  1. Call ContentProvider:PreloadAsync({assetId})
  2. Set image label image to asset id
  3. Set image label visible to true
  4. Expected result: Image is preloaded, there is no white background or flash, the method yields until loaded
  5. 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

  1. ContentProvider:PreloadAsync() yields until all images are loaded
  2. 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)

26 Likes

I’d like to bump this because it seems like the issue has spread over to animation preloading as well, I’ve noticed that the animations on my games characters play with a noticeable delay for the first time (which shouldn’t be happening when they are preloaded)

3 Likes

I was confused as to why my game had not been loading properly, despite me clearly having implemented preloading properly. I spent a good couple of hours figuring out the issue before giving up :upside_down_face:
This is a very major bug, especially to games that rely on things such as cutscenes or UI that they must make 100% sure to be loaded before showing.

3 Likes

Thanks for the report! I have filed a ticket.

7 Likes

Not all heroes wear capes. Thank you!

5 Likes

I’m aware this issue is now being tracked (thanks to the awesome DevRel staff!), but I’d just like to point out just how annoying this can get:


My bandwidth is pretty decent, which allows for the menu to load properly before the cinematic ends - but for some players with lower bandwidth, they may not even see the menu before it finishes!

5 Likes

Is this still happening? And any fixes for it?

1 Like

Yep, this is still happening, was looking for this type of post.

I’m glad a ticket was filled at least.

1 Like

No wonder my images were not pre-loading in any of my games. I really need this fixed, why has it taken over 6 months?

4 Likes

any updates on this issue? it still seems to be happening to me and my game has a few effects that utilize image animations and having those assets just pop in to existence looks very ugly.

2 Likes