Continuing on from the previous 9-slice sprite editor class, I decided to take the editor tools to the next level. I wrote several more editor extensions to assist in the creation of level geometry, the first was 9-sliced platforms. The tool allowed for a fully visual selection and presentation of the 9 sprites in the editor,and then further enhanced the usefulness of the component by providing options to increase the dimensions of a platform at will.
This tool evolved over time, eventually being able take a template prefab (with configured scripts on etc) and use that as a base object for all tiles in the 9 sliced platform. The tool also adds a single BoxCollider2D
encompassing the entire object. Added to the toolkit was the ability to take a sprite sheet for a ramp, and using similar techniques, create a fully functioning sliced ramp section in the same way as for a platform. The ramp however replaces a single BoxCollider2D
with a PolygonCollider2D
which is created in code. The Editor interface was modified to give a much cleaner interface for the growing number of options.