You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My Unity app loads lots of large images from a server, this causes Unity to freeze while decoding and rendering the image becuase this is all done on the main thread.
Does your code still use the main thread to load the images onto textures?
yes, just like #2 said:
Texture2D texture = new Texture2D(width, height, TextureFormat.ARGB32, false);
texture.LoadImage(data);
It could be done in a thread when decoding and rendering images, but I have no time to do and test it.
You can finish this on a new PR. I appreciate that.
My Unity app loads lots of large images from a server, this causes Unity to freeze while decoding and rendering the image becuase this is all done on the main thread.
Does your code still use the main thread to load the images onto textures?
To test have a code like this
void Update()
{
transform.rotate(Vector3(1,0,0)* Time.deltatime*10);
}
Run that while loading several images using your code, see if the object being rotated ever pauses and then resume rotation.
The text was updated successfully, but these errors were encountered: