Search Unity

Unity Editor Game Window

Discussion in 'Editor & General Support' started by sergi-gil, Nov 30, 2017.

  1. sergi-gil

    sergi-gil

    Joined:
    Oct 29, 2015
    Posts:
    9
    Hi all!

    For giving support to IphoneX safe area to all the designers that use Unity Editor to create the game UI, I was planning to detect somehow if in the Game Window you change the resolution/aspect ratio to one specific (Iphone X) and then show gizmos and do my magic to resize the needed rectTransform to the needed size.

    This way for all the designers this change will be transparent and they won't need to worry about testing easilly different resolutions and devices to be sure that all is looking good, before testing the game in device.

    Do someone nows how I can detect that the Game Window viewport has changed? or how can I define a defined safe area for every device/resolution/aspect ratio defined in the Game Window?

    Thanks in advance
     
  2. sp-sergio-gil

    sp-sergio-gil

    Joined:
    Mar 5, 2014
    Posts:
    45
    A part from this, perhaps it could be useful add a safe area text input boxes in the game window resolution devices... this way the Screen.safeArea could return this value from there somehow?