Give Page Feedback | API

Chunk Destroyers - Simple Chunk Destroyer

The Simple Chunk Destroyer is a very rudimentary implementation of a Chunk Destroyer. It will only search one level deep from the root Asset Chunk in order to find game objects to destroy, therefore if you have deeper hierarchies, it can be a good idea to create a Custom Chunk Destroyer instead of using this one.

It will destroy all child game objects of the root Asset Chunk and then finally the root Asset Chunk itself. It destroys a specific number of game objects per frame, and then either yields for a frame or for a fixed set of time.

Creating A Simple Chunk Destroyer Component

You can add this component by selecting a game object and then selecting from the Top Menu Bar:

Component -> Deep Space Labs -> -> SAM -> Chunk Destroyers -> Simple Chunk Destroyer

Adding A Simple Chunk Destroyer Component From The Top Menu Bar GIF

or by selecting a game object and using the Add Component menu via its inspector:

Component -> Deep Space Labs -> -> SAM -> Chunk Destroyers -> Simple Chunk Destroyer

Adding A Simple Chunk Destroyer Component From Add Component Menu GIF

Max Objects To Destroy In A Single Frame

The Destroyer will never destroy more than this number of game objects in a single frame. If there aren't that many game objects left in the Chunk's hierarchy, it won't reach this number, however in all other cases it will.

Yield Time

The time in seconds to yield after destroying the max objects to destroy in a single frame. If you set this to 0, a single frame will be yielded instead.