Trying to figure out how to do my own 9-slicing

Which specific aspect of the built-in solution is not working for you? Any examples?

Things to note:

  • margins are percentages
  • in Border mode use the smallest image dimensions you’ll ever need and only scale up
  • not all images can be 9-sliced
  • when working with materials, don’t forget to set Image Size (256x256) below - it will affect how the material behaves

The margin of .1 is enough in this example, as 10% of the edge is just enough to exclude from scaling.

It will always break at very small sizes as there’s not enough pixels to work with.

1 Like