Search Unity

[Solved] Scaling Multiple Canvases?

Discussion in 'UGUI & TextMesh Pro' started by Joedon, Oct 21, 2019.

  1. Joedon

    Joedon

    Joined:
    Oct 18, 2019
    Posts:
    2
    Hello,

    I'm trying to create a main menu with three different canvases. Right now it's just able to swipe between pages which works fine on the default screen size I'm testing it on (16:10), but I have been unable to use anchors to make it scale properly with different resolutions.

    Right now it looks like this:


    I'm trying to make it so the white canvas scales to how it looks at the start of the GIF, with its edges almost touching the edges of the screen, while also making sure the grey canvases stay the same distance away from it. As you can see, the grey canvases are anchored properly against it, but I don't know how to anchor all 3 of them together to scale with any screen size.

    Thanks,
     
  2. Joedon

    Joedon

    Joined:
    Oct 18, 2019
    Posts:
    2
    Update: I got it fixed by messing with the Canvas Scaler. However now for some reason my events aren't working (something to do with EventSystem?) for dragging. IDragHandler and IEndDragHandler events all of a sudden aren't being called.

    EDIT: I had a "Canvas" component on my first panel that had to be fully deleted, not just toggled off, to make my script work. Everything's good now!
     
    Last edited: Oct 21, 2019