Sliced Mesh Exporter
This window can export any selected sliced mesh as a Unity Asset. The exported mesh asset can then be used like any other mesh in Unity. The exporter can be found by navigating to Window -> 27 Slicer -> Sliced Mesh Exporter
.
It can export sliced meshes from both Mesh Slicer Components and Collider Slicer Components.
If an asset already exists at the file location it will be updated during export.
You can do one of the following to select sliced meshes to export:
- Select one or many games objects with a valid Slicer Component in a scene hierarchy.
- Select a prefab with at least one valid Slicer Component from the project window and then click the
Open Prefab
button in the inspector.
Common Scenarios
Export Sliced Mesh for General Use in Unity
The output of this scenario will result in sliced meshes being exported as individual .unity
assets.
- Ticked -
Save Project After Export
- Ticked -
Save As New Asset
- Unticked -
Finalize Slices
Settings not listed above can be set based on your own requirements.
Permanently Set Slicing (Finalize Slicing)
The output of this scenario will result in sliced meshes being exported as individual .unity
assets. The exported assets remain assigned to Mesh Filters and Mesh Colliders. The Slicer Controllers are then Finalized, which removes all Slicer Controllers, Components and Modifiers from the Game Objects.
- Ticked -
Save Project After Export
- Unticked -
Save As New Asset
- Ticked -
Finalize Slices
Settings not listed above can be set based on your own requirements.
Details
Output Path Pattern
Default: {meshAssetFilePath}\{meshAssetFileName}_{meshName}_{sliceType}.{ext}
The path that is used to build the output path for each exported mesh asset.
Clicking the reset button will set the pattern back to the default.
Note
The path must be relative to the project directory.
If Assets\
is missing from the start of the path it will be automatically included.
String replacement tokens
String | Description |
---|---|
{ext} | The asset file extension (.asset) |
{gameObjectName} | The name of the Slicer Components Game Object. |
{meshName} | The name of the original mesh |
{sliceType} | The type of Slicer Component that made the sliced mesh (slicedMesh OR slicedCollider) |
{meshAssetFileName} | The file name of the original mesh asset, excluding file extension |
{meshAssetFilePath} | The path of the original mesh asset |
Recursively Search
Default: false
When enabled the exporter will recursively search through all selected assets and their children. Otherwise it will search just the selected assets for suitable exports.
Save Project After Export
Default: true
Saves the project after exporting, this includes any assets that may of been exported.
Save As New Asset
Default: true
Saves the exported mesh as a new asset, rather than updating the existing asset.
Finalize Slices
Default: false
Finalizes the selected Game Objects after exporting.
This will finalize the slices of all the game objects that have been selected for export. It will remove all Slicer Controllers, Components and Modifiers while leaving the meshes etc in a sliced state.
Export Sliced Mesh
Default: true
Enables exporting sliced meshes.
Export Sliced Colliders
Default: true
Enables exporting sliced colliders.
Optimize Exported Mesh
Default: true
Optimizes all exported meshes.
Inherit Mesh Compression Settings
Default: true
Transfers the Mesh Compression settings from the original mesh to the exported mesh.
Mesh Compression
Default: ModelImporterMeshCompression.Off
Available only when Inherit Mesh Compression Settings
is set to false
.
Sets the Mesh Compression for all exported meshes.
Export As Mesh
When clicked, the export process begins and is saved to the paths shown in the Export List.