27 Slicer 27 Slicer
Search Results for

    Show / Hide Table of Contents

    Class SlicerController

    SlicerControllers are used to manage the slicing of SlicerComponents that are on the same GameObject as itself.

    Inheritance
    Object
    Object
    Component
    Behaviour
    MonoBehaviour
    SlicerController
    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.



    REFERENCE MANUAL

    Fields

    NameDescription
    Offset

    Offsets the SlicedBounds, useful if the sliced items needs to be offset without affecting the where it falls in the slice.

    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

    NameDescription
    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

    NameDescription
    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.

      ☀
      ☾
      In This Article
      Back to top
      27 Slicer documentation | Copyright 2021 Deftly Games
      ☀
      ☾