cancel
Showing results for 
Search instead for 
Did you mean: 

Avatar Asset Loading in Unity - Avoid blocking main thread with GPU texture upload?

StefDevs
Honored Guest
For the past day or so I've been working on reducing the framerate hitch upon loading assets from the native API. I've been fairly successful in dealing with mesh assets by limiting the amount of time spent marshaling vertices each frame, but the other major contributor is the texture assets which are taking up to ~500ms for one texture upload on my system (highest LOD).

From what I've gathered, Unity has no good way to load a texture asynchronously if it's not included in the project build. The best shot I can see is to upload the texture in a native plugin and pass a handle to the texture to unity (using Texture2D.CreateExternalTexture()?), but this is likely out of scope for my current project and it seems like quite a bit of necessary complexity to build a middle man for this. Although maybe I could achieve this in C# only...

Are there any plans to solve this problem in the Avatar SDK? Could we get the native native SDK to upload the textures asynchronously for us? I would love to achieve zero dropped frames in this experience.

Thanks,
- Stef
0 REPLIES 0