Search Unity

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

Feedback Make "Scale With Screen Size" work on world-space canvas

Discussion in 'UGUI & TextMesh Pro' started by Trisibo, Mar 25, 2020.

  1. Trisibo

    Trisibo

    Joined:
    Nov 1, 2010
    Posts:
    241
    With a screen-space canvas, you can use a canvas scaler with the option "UI Scale Mode" set to "Scale With Screen Size" to make the canvas scale/position the UI objects according to the screen and reference aspect ratios. However, by design, this is not possible with a world-space canvas, what would be the rationale for that decision? It looks to me that it should work just the same, just instead of adapting to the aspect ratio of the screen, it would adapt to the aspect ratio of the canvas in world space; the biggest difference seems to be that the size of the RectTransform wouldn't be controlled by the canvas, but by the user.

    One use case would be to have the same UI prefab usable on objects with different aspect ratios (say, game world displays, or on a world object and the device screen (to switch from world- to screen-space), without having to worry about whether the UI will properly fit on all of them. Or basically just being able to change the design of the world objects without having to also make significant changes to the UI.