Lanscape Orientation with Mobile Build on URP + 3D Template

Hi there,

I’ve had no issues building to mobile on the standard render pipeline with 3D template. However, the standard pipeline doesn’t have shadergraph… so I switched to URP so I can use a shader I made.

However, now there is a new issue exclusive to the camera and running the build on a mobile (device simulator is fine). I’ve tried with three different phones, but the result is the same.

The issue is this: The camera (UI is fine) seems to be stuck in portrait mode, even when Unity recognises that the screen orientation is landscape left or landscape right.

In any portrait orientation on phone: The objects of the camera aren’t stretched in any way, but it is zoomed/not how I intend the scene to look.

In any landscape orientation on phone: The objects of the camera (3d objects and cameras stacked on top) are presented as if portrait (do not rotate with the screen orientation), and are stretched.

I’ve been looking it up but can’t find an answer anywhere…Is this a bug?

I’m running on Unity 2023.1.0a6 with the 3D Template and URP, Device Simulator and Input System packages installed.
I tried on Oppo A91, Huawei P30 lite, and Huawei P40.

NOTE: I just tried running on the 3D Mobile template with URP and there doesn’t seem to be an issue there… is there some setting I can change in ordinary 3D template to get URP cameras working correctly or do I always have to choose 3D Mobile when making a project?

This may be part of the issue… We tend not to recommend alpha versions due to unpredictable behaviour…

Likely, this is some change they have made in Unity 2023. In Unity 2022, for example, while there is a mobile 2D and 3D template, there is no Mobile 2D or 3D URP template. It’s likely that they split off adaptive landscape/portrait mode into this template and left it out of the standard URP template (which outside of Mobile would never have a need to switch between landscape and portrait).

Privacy & Terms