Search Unity

Issue - Why does canvas items move position when I change windows around in editor

Discussion in '2D' started by brettsaunders, Jun 25, 2019.

  1. brettsaunders

    brettsaunders

    Joined:
    Feb 28, 2019
    Posts:
    4
    After moving the Hierarchy to the bottom of the screen I found that the canvas seems to have changed height and size. Plus the items I added to the canvas were now off centre and too small because of this?
    The canvas is set to Screen Space Overlay, so how do I avoid this issue.
    Unity Version: 2019.2.0b6

    View attachment 441380
     
  2. LiterallyJeff

    LiterallyJeff

    Joined:
    Jan 21, 2015
    Posts:
    2,807
    Screen Space Overlay means that your canvas will be the same dimensions as the game screen. So if you change the size of your game window, the canvas changes to match it. This is so you can build your UI to support as many aspect ratios and resolutions as possible, using your game window as a preview of potential device screens.

    Your attachment doesn't seem to be working.