Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Smooth corners

Discussion in 'UI Toolkit' started by LumoKvin, Mar 14, 2020.

  1. LumoKvin

    LumoKvin

    Joined:
    Sep 28, 2019
    Posts:
    195
    I am trying to get smooth corners. I have tried a variety of images. I have tried 9 slicing. How can I fix this?

    Screen Shot 2020-03-13 at 3.39.05 PM.png
     
  2. mcoted3d

    mcoted3d

    Unity Technologies

    Joined:
    Feb 3, 2016
    Posts:
    970
    At this time, you'll have to enable MSAA to achieve smooth, antialiased corners. This is in the quality settings (Edit > Project Settings > Quality > Anti Aliasing). Also make sure that your camera has MSAA enabled.

    Note that we may provide additional antialiasing methods in the future.
     
  3. LumoKvin

    LumoKvin

    Joined:
    Sep 28, 2019
    Posts:
    195
    Thanks for the help. I am still not getting smooth corners.

    Screen Shot 2020-03-14 at 12.52.07 PM.png
    Screen Shot 2020-03-14 at 12.51.39 PM.png
     
  4. mcoted3d

    mcoted3d

    Unity Technologies

    Joined:
    Feb 3, 2016
    Posts:
    970
    My bad, I forgot an important detail. The runtime panel currently renders in as an overlay after the cameras are done rendering. This means that MSAA settings are ignored by the UIElements runtime panel, they only works in an editor context right now.

    Since we only provide the overlay mode at this time, you options are limited. I think your only option is to set a RenderTexture with antialiasing enabled to your panel, then draw that texture over your scene.

    Again, we will provide more convenient options in the future.
     
    LumoKvin likes this.