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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Navigation Bar on Windows 10 mobile

Discussion in 'Windows' started by garv3, Mar 2, 2016.

  1. garv3

    garv3

    Joined:
    Dec 30, 2012
    Posts:
    32
    Hi all,

    I have got a question about the navigation bar behaviour in Windows 10 mobile Universal Apps.

    There are some devices that do not use hardware keys to display the navigation bar (back, Windows and search buttons) but display it on the main screen. It can then be shown or hidden as needed. In Unity games it is obviously hidden by default, but you can show it by swiping from the bottom of the screen. What the Unity player does here is not what I would suppose it to do.

    What happens in Unity games:
    If the navigation bar is hidden, the Player uses the whole screen space. When you display the navigation bar, the Player is decreased in size and the space that is used by the navigation bar is not used any more. This changes the aspect ratio of the game, because the navigation bar takes some pixels at the bottom in portrait or on the side in landscape mode.

    What happens in other games:
    They always use the whole screen space. If you show the navigation bar, it is displayed transparent above the game. This means that the aspect ration stays the same.

    Is it possible to achieve this behaviour in Unity?

    Thanks in advance!
    garv3
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,642
    Check the code in exported VS solution. We're suppressing system overlays for performance reasons. Maybe if you enable it (by modifying code), it would work as you want.
     
  3. garv3

    garv3

    Joined:
    Dec 30, 2012
    Posts:
    32
    Thanks! Can you tell me where to find it in the solution?

    Edit: Got it!
    App.xaml.cs
    "ApplicationView.GetForCurrentView().SuppressSystemOverlays = true;"
     
  4. garv3

    garv3

    Joined:
    Dec 30, 2012
    Posts:
    32
    Unfortuantely this does NOT solve the problem. The navigation bar still affects the aspect ratio.