Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Windows 10 Tablet Devices - Rotation Problem

Discussion in 'Windows' started by CDAfonsoCl, May 9, 2022.

  1. CDAfonsoCl

    CDAfonsoCl

    Joined:
    May 18, 2021
    Posts:
    14
    Hello everyone!

    I am having this issue with an app (Windows Standalone) running on a Windows 10 Tablet PC Device.

    When the app opens in Landscape mode for the first time, everything looks fine.
    Rotating the device to Portrait turns the app into a cropped square aspect ratio (no problem with that).

    The problem is, when returning to landscape mode the screen keeps the square format. The only solution to restore the original aspect ratio in landscape is closing the app and deleting the Registry entry's.

    I would like to get the app to "auto-fit" to the screen when coming back to landscape mode. Is that possible?

    Photos:


    1.


    2.


    3.
     
    Last edited: May 10, 2022
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,516
    Hey, which platform are you targeting? Windows Standalone or UWP? In either case, this sounds like a bug, would you mind reporting it?
     
    CDAfonsoCl likes this.
  3. CDAfonsoCl

    CDAfonsoCl

    Joined:
    May 18, 2021
    Posts:
    14
    Sorry, forgot to mention that. Windows Standalone. Thank you!
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,516
    Yeah, please file a bug report. We'll fix it.

    For now, you should be able to monitor Screen.mainWindowDisplayInfo.width/height and then adjust the resolution through Screen.SetResolution() manually.
     
    CDAfonsoCl likes this.