Hi folks,
I’m pleased to announce the release of Sprite Slicer on the Unity Asset Store
Sprite Slicer allows you to cut any physics enabled sprite into little pieces, each of which then behaves as its own independent physics object. Its perfect for bringing your 2D game to life with destructible objects and environments, or for creating a Fruit-Ninja style cutting game.
* Works on both Unity and 2D Toolkit sprites.
* Simple static script functions allow you to slice sprites along a given line, or explode them into multiple parts.
* Optimised to preserve dynamic batching and reduce draw calls.
* Slices any sprite with a 2D box, circle or convex polygon collider
* Full C# source code and example scene included
The code has been designed to be as transparent as possible - there are no new gameobjects to create; you simply pass a cut start and cut end point to one of the static Sprite Slicer functions, and the code will handle the rest. Once cut, each child sprite behaves as its own separate physics body, retaining all the physics and rendering properties of the parent object, and can itself be cut into further child objects. If required, the slicing functions can return a list of all the cut objects along with their child objects and cut positions, so that the user’s code can perform additional processing once the cut has taken place. Equally, you can delay destruction of the parent object in the event that you need to access variables from it before it is destroyed.
Screenshots
I hope this proves helpful to some people out there! Please feel free to reply in this thread or PM me if you have any questions ![]()
