How can I load in a certain asset first?

Hi devs,

Like the title says, I’m wondering how I can load a certain asset into the game first.
I’ve heard of PreloadAsset, but I’m not sure how that works. Does it give that asset the top priority to be loaded?
Also, is there a way to have nothing loaded in at first, and load things in a certain order? E.g. Loading gui first, then some buildings, then other buildings.

You can use InsertService, I think there is a property called autoLoad I’m not sure if it exists for everything tho…

1 Like

There’s a special service in Studio called ReplicatedFirst Anything you put there is going to be replicated (loaded) upon entering the game, during the loading section. From there you can copy assets that you know are already fully operational. Now it’s not a practical solution for rendering the whole Lobby, nor putting lots of assets in there (such as entire maps), but it’s still very helpful, especially when it comes to GUIs

1 Like

Does the same thing happen with ReplicatedStorage?

ReplicatedStorage is a place where assets are getting only partly loaded, meaning that once they are inserted to Workspace, they’ll still need approximately 1-2 seconds to load perfectly. ReplicatedStorage and ReplicatedFirst are different services, even though they share the same icon

I’m sorry for the bump, but I’ll clarify that there’s no property called autoLoad in the InsertService’s docs

:man_shrugging: .

1 Like

You should use ContentProvider’s PreloadAsync like mentioned above. Keep in mind that it should be used sparingly though since it can increase load times drastically for users. Some games preload every single asset which is terrible for that reason (specially when not every asset is used immediately).

1 Like