Search Unity

How to make screenspace root canvas respect Screen.SafeArea

Discussion in 'UGUI & TextMesh Pro' started by paradizIsCool, Nov 20, 2017.

  1. paradizIsCool

    paradizIsCool

    Joined:
    Jul 10, 2014
    Posts:
    178
    Hi,

    I try to change the rect of the root canvas (Screenspace camera in my case) to respect the Screen.safearea but I cannot change position or anchor...

    Is this possible and how ?


    Maybe canvas needs a new SafeScreenSpaceArea mode ?


    Thanks
     
  2. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    826
    Right now there is no implementation from unity. You can just add a root panel to your canvas (the first child in the canvas) that checks the screen size at awake that offsets itself when the screensize matches the iphone x resolution.
     
  3. paradizIsCool

    paradizIsCool

    Joined:
    Jul 10, 2014
    Posts:
    178