Canvas.renderingDisplaySize

public Vector2 renderingDisplaySize;

Description

Provides the pixel dimensions of the display area where the UI canvas is rendered.

This size is typically determined by the Game view or the current screen resolution and is affected by the canvas's render mode, scaling, and display settings.

  • Screen Space - Overlay Canvases: Corresponds directly to the screen resolution.
  • Screen Space - Camera Canvases: Represents the screen area covered by the camera.
  • World Space Canvases: The RectTransform width and height.

Did you find this page useful? Please give it a rating: