"Unity Notes" about Ugui's root node canvas

Source: Internet
Author: User

When a Ugui object is created, the canvas object is automatically created as the root node of all Ugui. The object has a canvas script , render mode options:

    • Screen Space-overlay: All the UI will work and display even if there is no camera available in the scene. And any game object that is not a UI element cannot be obscured by UI elements (regardless of how the non-UI object is positioned).
    • Screen Space-camera: A camera can be passed in to specify which camera renders all UI elements under the canvas object. You can specify the distance from the UI to the camera, adjust the distance, and other non-UI elements can precede or follow the UI element.
    • World Space: This canvas object acts as a flat canvas in the scene and can be arbitrarily adjusted for position, rotation, and so on.

Canvas scaler script on canvas object:

    • UI scale Mode
      • Constant Pixel Size: Fixed by pixel. The UI element size is the same regardless of how the screen size changes.
      • Scales with screens size: Commonly used, automatically scaled by screen size, which needs to be filled in at which resolution the UI is designed.
    • Scale Factor: The zoom multiplier of all UI elements under the canvas object. Display dimensions = monitor panel dimensions * multiples.
    • Reference Pixels Per unit:1 Meter has the number of pixels, the default of 100.

"Unity Notes" about Ugui's root node canvas

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.