AssetDatabase.LoadAssetAtPath() - Fast way of loading thousands of assets?

I’m currently loading and caching about 3000 24px icons. Loading these one at a time takes about 8 seconds on my machine the first time editor tool is loaded. Just wondering if unity offers any kind of batch loading or parallel loading that might make this faster?

2 Likes

Decided to implement lazy loading. Still takes 8s total but spread put

First off, sorry if this is something you know about.

I have encountered a similar issue for loading many icons as “Sprite” object, but the cause was Sprite.Create() API.

I improved the loading speed by changing 6th argument (= meshType) of Sprite.Create() from SpriteMeshType.Tight to SpriteMeshType.FullRect.

The cons is that instead of fewer vertices for each sprites, more transparent areas created, which may decrease the draw speed if you need to draw many icons at once.

[References about “Mesh Type” of Sprite object]

1 Like