Method SliceVerts
SliceVerts(Bounds, Transform, Vector3, Transform, Bounds, Bounds)
Slices a bounds as if it is made up of discrete vertices.
Declaration
public static Bounds SliceVerts(Bounds origBounds, Transform boundsTransform, Vector3 size, Transform rootTransform, Bounds completeBounds, Bounds slicedBounds)Parameters
| Type | Name | Description |
|---|---|---|
| Bounds | origBounds | The bounds to slice |
| Transform | boundsTransform | The transform of the GameObject that contains the bounds |
| Vector3 | size | The final size (as a scale) of all the items that are to be sliced. See |
| Transform | rootTransform | The transform of the parent |
| Bounds | completeBounds | The complete bounding box of all sliced items after being sliced. See |
| Bounds | slicedBounds | The bounding box of the slices that will be made. See |
Returns
| Type | Description |
|---|---|
| Bounds | Returns the sliced bounds |
SliceVerts(Mesh, Mesh, Transform, Vector3, Transform, Bounds, Bounds, Boolean, Hash128)
Slices the vertices of the supplied origSharedMesh and applies it to the supplied modifiedMesh.
Declaration
public static Hash128 SliceVerts(Mesh origSharedMesh, Mesh modifiedMesh, Transform meshTransform, Vector3 size, Transform rootTransform, Bounds completeBounds, Bounds slicedBounds, bool skipVertices, Hash128 previousHash)Parameters
| Type | Name | Description |
|---|---|---|
| Mesh | origSharedMesh | The original mesh. |
| Mesh | modifiedMesh | The mesh the slicing will be applied to. |
| Transform | meshTransform | The transform of the GameObject that contains the mesh. |
| Vector3 | size | The final size (as a scale) of all the items that are to be sliced. See |
| Transform | rootTransform | The transform of the parent |
| Bounds | completeBounds | The complete bounding box of all sliced items after being sliced. See |
| Bounds | slicedBounds | The bounding box of the slices that will be made. See |
| Boolean | skipVertices | Should the verts be sliced, if true the vertices will not be sliced. |
| Hash128 | previousHash | The previous hash from slicing, used to determine if any changes should be uploaded to the GPU etc. |
Returns
| Type | Description |
|---|---|
| Hash128 | Returns the hash of the sliced verts, or SkipVertHash if |