Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

Bug New a Texture2D of format RGBA_ETC2_UNorm with mipmaps can cause EXC_BAD_ACCESS on iOS

Discussion in 'General Graphics' started by zhutianlun810, Jul 27, 2021.

  1. zhutianlun810

    zhutianlun810

    Joined:
    Sep 17, 2017
    Posts:
    145
    Hello,

    I am facing a bug in my little project. I am creating a Texture2D of format RGBA_ETC2_UNorm with 8 mipmaps at runtime:

    Code (CSharp):
    1. GraphicsFormat format = GraphicsFormat.RGBA_ETC2_UNorm;
    2. int mipmapCount = 8;
    3. Texture2D copyTex = new Texture2D(width, height, format, mipmapCount, TextureCreationFlags.None);
    I found these three line of code work perfectly on Android. However, they will cause EXC_BAD_ACCESS on iOS.

    The XCode shows that EXC_BAD_ACCESS is triggered in function UploadMipPyramid [inlined]. Any ideas?
     
unityunity