Sprite Breaker
Sprite Breaker splits Sprites into shards to simulate object breakage with minimum effort or maintenance.
Break in editor or at run-time, randomly or into pre-designed pieces. The shards will fall and fade away automatically.
Features
- Breaks sprite into MeshRenderer-based GameObjects.
- Shapes can be random or pre-designed.
- Fade and remove after set time.
- Break at run-time or in editor.
- Uses sprite's original texture and shared material.
- Optionally use a different sprite from the one being broken.
- Optional callback can be used to initialize custom per-shard behavior.
- Per-shard pivot, name, tag, physics, and custom data supported.
- Custom shards from prefabs supported.
- Can be used for purposes other than exploding objects: break sprite into MeshRenderer pieces in editor, use pieces for animation or object construction.
- Sprite Atlas and prefabs support.
Getting Started
- Add a GameObject to scene with SpriteRenderer attached. Assign a sprite to the SpriteRenderer component.
- Add SpriteBreaker component to this GameObject.
- In Inspector window enable "Break on Awake" checkbox.
- Press Play in editor
More Info
For component and editor help, check out Documentation.
For using Sprite Breaker in code, please see the API.