9 / 25 Slice

18
19
0
1

9-Slice and 25-Slice example

Use Arrow Keys to adjust the size.


I didn't think of making a 9-Slice/25-Slice example. 9-Slice is something that has existed for awhile, but PixelPizza was creating a 25-slice version (forum post). So this is entirely his idea, this is just my take on the code because his was busy. I didn't look at his example before making this, so the code is likely very different from his, so I highly recommend you check his out if it works better for you.

Also it turns out this is very different than his idea for 25 slice lol


Details

Objects are ready to be directly copy and pasted.

However there are some things you will need to do.

  1. Change the "Sprite Size." I'm assuming you will use 32x32, but if you use something larger like 64x64, you will need to change that number.
  2. Set Display Order. This is Number is only needed with the 25-Slice version.
  3. Go inside the main bundle and set the "Spawn" behavior. It should be set to the object itself, so "9-Slice" is spawning "9-Slice"
  4. Set the "Animation" behavior to the correct animation.
Editor