Texture is flipped after Graphics.CopyTexture to cubemap

I am trying to create cubemap from separated textures which comes from server at runtime.
I do UnityWebRequestTexture.GetTexture for each texture and then Graphics.CopyTexture(tex, 0, cube, face)

Texture2D[] texture = ...
Cubemap cubemap;
{

    cubemap = new Cubemap(texture[0].width, texture[0].format, false);
    Graphics.CopyTexture(texture[1], 0, cubemap, 0);
    Graphics.CopyTexture(texture[3], 0, cubemap, 1);
    Graphics.CopyTexture(texture[5], 0, cubemap, 2);
    Graphics.CopyTexture(texture[4], 0, cubemap, 3);
    Graphics.CopyTexture(texture[0], 0, cubemap, 4);
    Graphics.CopyTexture(texture[2], 0, cubemap, 5);
}

I guess to get correct cubemap at least in Inspector, but unexpectedly textures are flipped for no reason (see by_copytexture.png). When I do this by creating cubemap as asset and inserting preloaded textures to cubemap inspector view then I get correct cubemap (see by_hand.png).

It is possible to reproduce this case by importing cubemapCheck1.unitypackage which is attached to the tread to any project. It contains one scene, one script and 6 preloaded textures for cubemap.

4971878–484322–cubemapCheck1.unitypackage (232 KB)


I am having the same issue. I think that this may have something to do with it.

"Vertical Texture coordinate conventions differ between two types of platforms: Direct3D-like and OpenGL-like.

  • Direct3D-like: The coordinate is 0 at the top and increases downward. This applies to Direct3D, Metal and consoles.
  • OpenGL-like: The coordinate is 0 at the bottom and increases upward. This applies to OpenGL and OpenGL ES.

This difference tends not to have any effect on your project, other than when rendering into a Render Texture
. When rendering into a Texture on a Direct3D-like platform, Unity internally flips rendering upside down. This makes the conventions match between platforms, with the OpenGL-like platform convention the standard."