14 / 16
Packages/2D Destruction Pro/Events & reassembly
DEVELOPER REFERENCE
14 / 16

Events & reassembly

Handle synchronous slice notifications and retire references when restoring a source.

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

Subscribe with the component lifecycle#

Detailed slice events run synchronously on the main thread. Subscribe in OnEnable, unsubscribe in OnDisable, and keep handlers brief. The guide states that handler exceptions are isolated/logged and recursive same-object slicing from a slice callback is rejected.

This contextual fragment assumes an assigned target and your own HandleSlice / HandleReassemble handlers:

C#
private void OnEnable()
{
    target.OnSliceCompleted += HandleSlice;
    target.OnReassembleRequested += HandleReassemble;
}

private void OnDisable()
{
    target.OnSliceCompleted -= HandleSlice;
    target.OnReassembleRequested -= HandleReassemble;
}

Follow the request lifecycle#

EventStage
OnSliceStartedRequest processing begins.
OnSliceValidatedGeometry, limits and pool preflight passed; live state is about to change.
OnSliceCompletedResult and metadata have been committed.
OnFragmentCreatedEach new child after completion.
OnSliceFailedA request was rejected.
OnReassembleRequestedRestoration begins, before fragment handles retire.

Slice events carry RuntimeSliceEvent with Kind, Result and, for fragment creation, Fragment. Existing whole-object lifecycle events include Destroyed and Restored.

OnSliceValidated signals successful preflight. It does not guarantee that unrelated application callbacks cannot subsequently interrupt game logic.

Restore the source#

Reassemble() restores the original source object and invalidates active runtime fragment handles. It is restoration rather than recorded reverse playback. Expired pieces cannot animate back, but the source still restores.

Reassembly clears the prior ancestry tree. Discard stored fragment handles and IDs from that previous cycle; resolve fresh references for new cuts.

Exported children restore independently#

A combined prefab exported from the Manual Slice Editor contains independently destructible children. Calling Reassemble() on one child restores that child's exported fragment Sprite. It does not join siblings or rebuild their unsliced parent artwork.

Read prefab export when choosing between a single runtime source and several exported destructible objects.

Adapted from the supplied guide · PDF pages 13, 21, 26.View source guide ↗
Keep creating.ERAGAN STUDIO.

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