Camera tries to fit view in mobile build

Hey guys!

Trying to do: Build on mobile in Portrait-only mode. (3D Game)

Error: Camera preview in the Editor works fine / as expected but when I build to mobile the view is “fitted” into the portrait mode and the camera preview(small window in the editor) switches to landscape mode. So everything looks weird as all my objects are some kind of slim…

Unfortunately I’ve not found a solution on this little problem until now.
Maybe someone knows how to solve this issue? I guess it’s a setting thing but after trying several things I just can’t figure out how to make the build look like the editor preview…

Thanks a lot!

There is a free asset on the asset store that you could use to easily lock your aspect ratios for all types of screens.
Auto Letterbox, works like a charm.

Thanks for the reply but this doesn’t solve the issue…
Well maybe with a screenshot it’s easier to understand whats the matter:
Thats what I see in the Editor and what I’d like to see in my build:

And thats the result when I build or use the Device Emulator:

Any Idea how to fix this?

Well it could solve the issue tbh, because as of now it seems like it is stretching to fill the native aspect ratio on the current device. My application behaved in the same manner and I solved it by adding a default aspect ratio that all devices use.
A different solution is to dynamically change the camera viewport depending on which aspect ratio is used on the device.

Well… it turned out that it was my fault…
I’m working with MLAgents and in the Academy class there is by default an inference configuration where you set the width and height… didn’t checked that so yeaah… anyway, thanks for the respond!