Search Unity

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

Question 9-slice mask on tiled image (2021.3)

Discussion in '2D' started by bluebrain, Oct 7, 2023.

  1. bluebrain

    bluebrain

    Joined:
    Jun 18, 2014
    Posts:
    39
    Hi all. Thanks in advance for your help.

    The goal is a few different vertically scalable UI boxes with different angled corners, not symmetrical, - for example, a box with small angled top corners and a large angled bottom left corner.

    2023 supports 9-slice sprite masks, 2021 does not.

    Parent w Tiled Background (needs a 9-slice mask)
    Vertical Layout Group with 9-slice Frame image
    Contents

    Any anyone suggest the most ideal / elegant solution?

    Thank you!
     
  2. sildeflask

    sildeflask

    Joined:
    Aug 16, 2023
    Posts:
    329
    make a render texture, use readpixels to take a screenshot, then use it as a sprite for the mask