Getting Started
Initial Setup
These steps should be followed when both upgrading versions and installing for the first time.
- Backup your project.
This process is not likely to cause an issue, but it is always better to be safe. If you are not already, have a look at using source code management software like Git. - Upgrade Unity to 2019.4 or newer.
27 Slicer is built with Unity 2019.4 and tested on select newer versions. - Delete any older versions of 27 Slicer.
Unfortunately Unity's package importer does not handle deleted or renamed files. This may lead to compilation errors if the update has deleted or renamed any files.
The default location of the folder is/Assets/Plugins/27 Slicer/
. - Import the 27 Slicer Unity Package.
From the Asset Store:- In Unity navigate to Window -> Package Manager.
- From the Package Manager, in the top left drop down select "Packages: My Assets".
- Search for "27 Slicer" and select the package to install and click import.
- Check all the files you wish to import (Feel free to uncheck the "Demos" Folder).
- Click Import.
From a .unitypackage file: - In Unity navigate to Assets -> Import Package -> Custom Package.
- Navigate to the .unitypackage file.
- Check all the files you wish to import (Feel free to uncheck the "Demos" Folder).
- Click Import.
Explore the Demos
Check out the demos to see the concepts of 27 Slicer in action. These demos will step you though each of the major features of 27 Slicer.
You can also give the demo a go online.
Slicing a Game Object
The basic setup of 27 Slicer is simple.
- Select the base (root) GameObject of the model you wish to slice.
- Add a Slicer Controller to this GameObject.
- Also add a Mesh Slicer component to this GameObject.
- Adjust the
Size
andSlices
properties to adjust how the model is sliced
While editing a Slicer Controller
you can click the Enable Edit Mode
to help visualize how the model is being sliced.
The Anatomy of a Slice
If you are familiar with 9 Slicing, this technique will be familiar to you.
A sliced model will consist of 4 types of segments. In the below example the cube has been sliced through the black lines. These slices can be adjusted as required to include or exclude portions of the model from being stretched. In a more complex model these same segments are used to determine what parts of the model are in what segment type.
Key:
Corners (8) - The corners do not change in size, but are moved (translated) to fit within the size set by the slicer.
Edges (12) - The edges will also be moved along their 'skinny' dimensions and will be stretched (scaled) along their 'long' dimension.
Faces (6) - The faces are stretched in two dimensions to fill out the remaining space left by the moved edges.
Core (1) - The core is stretched in all three dimensions.
Check Out The Reference Manual Pages
Continue reading more in depth about the 27 Slicer components, like the Slicer Controller, Slicer Components and Slice Modifiers pages.