Hello everyone. I’m new to the forum so please correct me here if I do anything wrong while trying to get help.
What I’m trying to do is to convert a Texture2D to a byte array and then back to a Texture2D. What I do is more or less something like this:
Texture2D texture2 = new Texture2D(texture1.width, texture1.height, texture1.format, false); texture2.LoadRawTextureData(texture1.GetRawTextureData());
This works perfectly fine on both Editor and Exe build but not on WebGL. The texture I get on WebGL is blank with a color close to white. When I debug the bytes, I see that I get different bytes on WebGL and Editor. They’re all 205 on WebGL. Does anybody have a suggestion about this problem I have? Thanks in advance.