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

Still happening.

Attempting to Preload SurfaceGui Images by AssetId before they’re seen in the world to no avail.
Hacks don’t seem to do anything for this situation.

AssetIds don’t appear to load when not .Visible or when .ImageTransparency is 1

3 Likes

I seem to have found a Solution!

See, if you set the ImageTransparency to 1 it won’t load, but if you set it to 0.999 it will load, still pretty much invisible. This works for me, tell me if you have any problems.

There is really no way to make the loading faster, but if we preload them i hope it gives you the effect you want.

5 Likes

This is still an issue and breaks the core promise of ContentProvider:PreloadAsync. Nothing I pass through that function should appear to “flash” in the way described in the OP. While there are special case workarounds, this should just work.

5 Likes

Would like to bump this, it’s very frustrating!

5 Likes

This is still occurring. The creator hub docs are also misleading because they use an image asset in the code example. This needs to be fixed. Has the ticket from nightend16 been pushed forwards at all? I know there’s a lot of bug fixing/UX improvements happening @ Roblox right now, this would be great to get fixed.

3 Likes

I agree, this should be very high priority as it affects almost EVERY game thats live right now, players are wasting their time waiting for “assets loading” screens thinking it actually does something, only few games have a “skip loading” button and even less players use it

3 Likes

Would also like this pushed forward to Roblox as well. It’s really annoying. I thought I was implementing the preloading wrong but it seems that’s not the case. Glad to see it’s a known issue, but I would rather see it not be an issue in the first place.

4 Likes

It’s disappointing this issue is still prominent years after it was reported. This method doesn’t even do what it’s supposed to.

An official response from an engineer or DevRel member would be appreciated.

3 Likes

I’m going to bump this even further.

My game has been suffering aesthetic-wise because of this issue. The images take a while to load, sometimes even like 3 seconds and it’s so frustrating!

1 Like

Also having issues with this and can hopefully get some more optics on it. PBR textures with preload async does not work at all and you end up with greybox levels.

3 Likes

I’m still having this issue as well! It’s hurting my players UX.

3 Likes

Bump, this still happens, it doesn’t preload images :frowning:

1 Like

Experiencing this as well, thought I was crazy-Preload API appears to be doing something, but in reality, the textures and audio in my game are still loading as if it’s downloading them

2 Likes

same with me!!!aaaaaaaaa

1 Like

Hi everyone, thank you for your continued patience on this bug. We were able to fix the root cause of this issue in version 583 of Roblox Client/Studio. ImageLabels should now be able to preload properly. However, you will need to pass the ImageLabel to PreloadAsync as an Instance instead of as an asset ID string for it to work. Doing so allows PreloadAsync to use more specialized loading that is specific to the type of Instance passed to it, making it work more reliably (see ContentProvider:PreloadAsync and Preload update). Sorry for the lack of clarity on this API - we will be updating the documentation to more accurately reflect the expected behavior of PreloadAsync.

Preloading ImageLabels as Instances should no longer create a “flash” as shown in this repro. Due to another issue that the repro helped us discover, the ImageLabel’s isLoaded value may be incorrect when checked right after PreloadAsync is called. We are still working on fixing this, but ImageLabel preloading should now be working properly even if the isLoaded property seems to indicate otherwise.

Thank you @Quenty for providing such a clear description and repro for this bug; they helped immensely! If this issue is still occurring, please create a new topic for us to look into.

9 Likes

Thank you so much for finally addressing this! My game heavily relies on this feature and it’s so awesome to see it be fixed. :smile:

If you could let us know when the documentation is updated, it’d be highly appreciated. :+1:

Just a quick query; would creating an ImageLabel, setting the image ID, invoking the :PreloadAsync() function on it, and then destroying it allow that same image ID to be used with other images that are newly created in the game? Surely it doesn’t just load the image object you call it on, right?

1 Like

Just to clarify, you’re not required to use an ImageLabel to preload an image asset, correct?

There’s plenty of other instances that contain texture properties, such as Decals, SpecialMeshes, Shirts, SurfaceAppearance, etc.

Just a quick query; would creating an ImageLabel, setting the image ID, invoking the :PreloadAsync() function on it, and then destroying it allow that same image ID to be used with other images that are newly created in the game? Surely it doesn’t just load the image object you call it on, right?

Yes, this should work if the preloaded object and the new objects are the same Instance type (for example if they are all ImageLabels). One thing to keep in mind is that the image texture may be garbage-collected from the cache if there is a long period of time between the deletion of the preloaded object and the creation of the new ones.

Just to clarify, you’re not required to use an ImageLabel to preload an image asset, correct?
There’s plenty of other instances that contain texture properties, such as Decals, SpecialMeshes, Shirts, SurfaceAppearance, etc.

Correct, preloading images in other instances should also work when the instances that contain them are passed to PreloadAsync. However, preloading SurfaceAppearances is not currently supported

4 Likes

This topic was automatically closed after 6 days. New replies are no longer allowed.