I am downloading an image as Texture during runtime and want to display it in my UI.
How do I convert Texture to Sprite for UI during runtime?
I only found how to convert Texture2D to Sprite. But not Texture to Texture2D.
I am downloading an image as Texture during runtime and want to display it in my UI.
How do I convert Texture to Sprite for UI during runtime?
I only found how to convert Texture2D to Sprite. But not Texture to Texture2D.
Simply cast the Texture to Texture2D.
Texture2D image = www.texture as Texture2D;
It worked! Thank you. It really was that easy. ![]()