Quantcast
Channel: Questions in topic: "crash"
Viewing all articles
Browse latest Browse all 2383

Crashes when using camera.SetTargetBuffers on IOS11 if external display is attached

$
0
0
Unity crashes on IOS11 if external display is attached XCode Version 9.0 beta 6 (9M214v) Unity 2017.1.1p1 IOS 11 beta. 1) Build your app to your device 2) Attach external display 3) Start the app. I copied the code exactly from the example in the documentation: https://docs.unity3d.com/ScriptReference/Display.html public class TTDisplay : MonoBehaviour { public Camera itsExternalCamera; public Camera itsMainCamera; void Start() { // GUI is rendered with last camera. // As we want it to end up in the main screen, make sure main camera is the last one drawn. itsExternalCamera.depth = itsMainCamera.depth - 1; itsMainCamera.SetTargetBuffers(Display.main.colorBuffer, Display.main.depthBuffer); itsExternalCamera.enabled = false; } void Update() { if (Display.displays.Length > 1 && !itsExternalCamera.enabled) { Display.displays[1].SetRenderingResolution(256, 256); itsExternalCamera.SetTargetBuffers(Display.displays[1].colorBuffer, Display.displays[1].depthBuffer); } itsExternalCamera.enabled = Display.displays.Length > 1; } } I submitted a bugreport today. Anyone else has this issue? Best wishes, Michal

Viewing all articles
Browse latest Browse all 2383

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>