When the user goes back to the page and wants to see their current objects with the icons they uploaded (or the default one if they didn’t upload a custom icon), I talk to my server and get the data in JSON format. I then try to get the image and display it back to the user via:
Recv:
byte[] tmpBytes = Convert.FromBase64String(iconImg);
Texture2D imgTexture = new Texture2D(500, 500);
imgTexture.LoadImage(tmpBytes);
uiImg.sprite = Sprite.Create(imgTexture, new Rect(0, 0, imgTexture.width, imgTexture.height), new Vector2(1.0f, 1.0f));
But after this loads, the image has no sprite and is empty. It is clearly changing the default source image to empty in the editor.