08 / 16
Packages/2D Destruction Pro/Export PNGs & prefabs
AUTHOR YOUR FRAGMENTS
08 / 16

Export PNGs & prefabs

Create reusable fragment Sprites and a combined prefab while preserving their arrangement.

English guideSource: Unity 6000.3.13f1 · Optional Jobs / BurstWeb edition · 21 October 2026

Export fragment PNG Sprites#

  1. Generate valid fragments in the Manual Slice Editor.
  2. Set Assets folder to a project-relative path inside Assets/.
  3. Select a fragment and click Export selected PNG, or use Export all PNGs for all active generated fragments.
  4. Read the per-fragment status messages and inspect the imported Sprite assets.

The default destination is Assets/2DDestructionPro/Exports/<SourceSprite>/. Filenames use the source and fragment index/name. Identical content may be reused; existing different image content is preserved by adding a numbered suffix.

The supplied export capture shows PNG Sprite assets. It does not show a generated prefab hierarchy.

The exporter rasterizes the fragment mesh triangles and UV mapping into a tightly cropped transparent PNG Sprite. It preserves source pixels-per-unit and applicable filter, wrap and import settings. Unity render/readback requires a graphics device; a headless export may fail.

Create a combined prefab#

Click Create all Images in one Prefab. The editor creates or reuses each generated fragment's PNG Sprite, then saves a <Source>_Sliced.prefab. If that prefab filename already exists, a numbered suffix preserves the existing asset.

PartSaved structure described in the guide
RootNamed after the source with a sliced suffix.
ChildrenEach authored fragment at its source-local pivot/geometry position. Together the images reproduce the source arrangement.
Child componentsSpriteRenderer, a matching polygon collider, Rigidbody2D and the package's required destruction/pool components.
Default Material ProfileAssigned when one was saved with the data.
SortingSet on the prefab as needed; sorting layer/order is not stored in ManualSliceData.

This structure follows the source guide's export description. The supplied screenshots do not document a generated prefab hierarchy.

Use the exported prefab#

Drag the prefab into a scene or instantiate it from gameplay. The guide provides this contextual fragment; slicedPrefab, position and rotation must come from your own component:

C#
GameObject sliced = Instantiate(slicedPrefab, position, rotation);
// Select a child Destructible 2D component, then call Explode()
// or ApplyImpact(...); call Reassemble() to restore that child.

Each child is an independent destructible object. Reassembling a child restores its exported fragment Sprite; it does not reconnect siblings or reconstruct the unsliced source.

Exported children with holes or disconnected regions can be valid manual fragments while remaining outside current Runtime Slice source support. Check the runtime requirements before adding runtime cutting to them.

Adapted from the supplied guide · PDF pages 12–13.View source guide ↗
Keep creating.ERAGAN STUDIO.

Search a topic, setting or method across all package guides.