Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Any easy way to pan/zoom the UI along with the camera?

Discussion in 'UGUI & TextMesh Pro' started by JoeStrout, Feb 17, 2021.

  1. JoeStrout


    Jan 14, 2011
    I'm working on a mobile version of my game, and I need the ability to zoom and pan with two fingers. That's easy enough to do for the main camera, by adjusting the camera position and orthographicSize. But it doesn't affect the UI, even though the Canvas is set to Screen Space - Camera.

    I want this:

    But instead I'm getting this (note the unzoomed frame, which is drawn by the Canvas):

    Is there any easy trick to make the canvas stick with the camera?