Mesh Slicer. Slice prosessing

Package on asset store: The main stages of slicing is:

  1. Preparing data

  2. Find all renderers with meshes

  3. Slice meshes

  4. Finish

Preparing data stage

Here, in PrepareData method, you can do some pre-calculations and store it in slice data, it will be returned to you in finish method. For example, you can save the Id of the person who is going to chop the enemy's head and then get it in OnSliceFinished method. It is important in asynchronous mode, because you may have a lot of slicing at the same time and you do not know how was initiator of successful one.

Slice meshes

The plugin tries to slice each mesh separately. If, after slice, validation is not success, it do not slice this mesh.

The whole slice is success if we have meshes on both sides of the plane, even if no meshes was sliced.


Apply changes and invoke event handlers. I believe nothing is needed to be clarified there.

382 views0 comments

Recent Posts

See All