EDIT: I’ve confirmed this is 100% a bug with 5.3.5p2 as the exact same project works in 5.3.4p4.
Create a blank unity project. Attach a new script to the main camera with the following code in the Start() function:
Screen.SetResolution (1280, 720, true);
Deploy to Android device and Unity reports the following:
06-08 15:12:36.267 8965 8979 D Unity : [EGL] Using protected surface (EGL_PROTECTED_CONTENT_EXT)
06-08 15:12:36.269 8965 8979 E Unity : [EGL] Failed to create protected window surface: EGL_BAD_ATTRIBUTE: An unrecognized attribute or attribute value was passed in the attribute list.
06-08 15:12:36.269 8965 8979 E Unity :
06-08 15:12:36.269 8965 8979 E Unity : (Filename: ./Runtime/GfxDevice/egl/WindowContextEGL.cpp Line: 123)
06-08 15:12:36.269 8965 8979 E Unity :
06-08 15:12:36.272 8965 8979 D Unity : ANativeWindow: (1920/1080) RequestedResolution: (1280/720) EGLSurface: (1280/720)
06-08 15:12:36.282 8965 8995 D Unity : Requested framebuffer: resolution[1280x720], rgba[8/8/8/8], depth+stencil[on], samples[1]
06-08 15:12:36.282 8965 8995 D Unity : Created framebuffer: resolution[1280x720], rgba[8/8/8/8], depth+stencil[24/8], samples[0]
06-08 15:12:36.287 235 235 E SurfaceFlinger: rejecting buffer: bufWidth=1280, bufHeight=720, front.active.{w=1920, h=1080}
06-08 15:12:36.304 235 235 E SurfaceFlinger: rejecting buffer: bufWidth=1280, bufHeight=720, front.active.{w=1920, h=1080}
06-08 15:12:36.321 235 235 E SurfaceFlinger: rejecting buffer: bufWidth=1280, bufHeight=720, front.active.{w=1920, h=1080}
Then nothing is rendered to screen after this.
I’m on version 5.3.5p2.
Any help would be greatly appreciated.
Alex