Forum Discussion
Unity Surface Duo Sample is broken
DStephensJr I haven't looked at Unity in a while, but I can confirm that last version update we did was for 2019.4 because it's the LTS version. It seems like each version of Unity slightly changes how it integrates with gradle and native packages, so will have to investigate newer versions to see if there's anything we need to update.
The DisplayMask jar file is our core dual-screen library, so the issues are more likely to be the sample itself, or interactions with how Unity is detecting device orientation.
Note that LandscapeLeft versus LandscapeRight refers to the the orientation with respect to the phone's controls, it does not refer to the left/right screens of the Surface Duo.
While it's not likely to be the cause of any of these issues, could you share which Unity version you're building with and which OS version your Surface Duo is running?
My Duo reports build number 2021.419.70.
I did update the sample app with the items I previously described (gradle and properties, maven does not appear to be necessary and may mean properties changes are unnecessary as well).
Both the 2019 Unity and the 2021Unity compilations have terribly scrambled behaviors for the screen orientation. In Dual (spanned) mode, the portrait orientations are inverted from the device to the screen. That is, Device reports Device reports Portrait and Screen reports PortraitUpsideDown and displays upside down. When Device reports PortraitUpsideDown, Screen reports Portrait, but the display remains upside down.
I don't think it has anything do with the Sample, but it could be Unity or something in the interaction of the Duo with Unity. Razer Phone 2 works (correctly) as expected.
Thanks again.