1

I need to create random-shaped (could be rectangular or circular) border for my UI, which can change its size, thickness and color of line. What approach to choose?

  • 9-slice scaling texture is not an option since I need to change colors of line and background dynamically.
  • Write my own shader - I tried to dive into it and I think I'm not up to it right now. Also I was unable to find shader like this made by someone else.
  • Create border as a mesh, which is probably expensive in GPU resources.

This must be very common task, I really need advice from experienced unitist. How would you do this? Thanks.

nochnoy
  • 31
  • 3
  • 1
    A single mesh (if that solves your problem) should not really be any issue in terms of GPU resources. But [this asset](https://assetstore.unity.com/packages/tools/gui/procedural-ui-image-52200) may be of interest to you, as they promise rounded borders with ease (but it costs something). – Philipp Lenssen Feb 01 '20 at 21:11

0 Answers0