Class SlicerController
SlicerControllers are used to manage the slicing of SlicerComponents that are on the same GameObject as itself.
Namespace: Slicer
Assembly: 27Slicer.dll
Syntax
[DisallowMultipleComponent]
[ExecuteAlways]
[AddComponentMenu("Slicer/Slicer Controller")]
[HelpURL("https://slicer.deftly.games/manual/components/slicer_controller.html")]
public class SlicerController : MonoBehaviour
Examples
In the below image the SlicerController is managing the MeshSlicerComponent which will slice any Meshes that are a decedent of this GameObject.
The Size property is set to double the x dimension of the mesh while keeping the other dimensions the same as the original mesh.
The Slices property defines the where the slices should occur. Ranging from 0 (the center of the object), to 1 being the furthest extents of the object.
Fields
Name | Description |
---|---|
Offset | Offsets the |
Size | Adjusts (Scales) the final dimensions of the sliced item. |
Slices | Adjusts where the slices should occur. Ranging from 0 (the center of the object), to 1 being the furthest extents of the object. |
Properties
Name | Description |
---|---|
CompleteBounds | The bounding box of all of the of all the items that are being sliced. |
PreviousHash | The hash that was calculated during the previous slice |
SlicedBounds | The dimensions that will be used by the slicers to determine if particular features are to be stretched (scaled). |
SliceModifiers | A read only collection of SliceModifiers |
SlicerComponents | A read only collection of SlicerComponents |
SlicerIgnores | A read only collection of SlicerIgnores |
Methods
Name | Description |
---|---|
DisableSlicing() | Disables slicing for all of the SlicerComponents controlled by this SlicerController. |
EnableSlicing() | Enables slicing for all of the SlicerComponents controlled by this SlicerController. |
FinalizeSlicing(Boolean) | Finalizes slicing for this Slicer Controller. |
RefreshSlice() | Refreshes the slices managed by this controller on the next frame update. |
RefreshSliceImmediate() | Refreshes the slices managed by this controller, this slice happens immediately. Generally you will want to use RefreshSlice() instead. |