<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/MeshResource/ShapeExtrusionOptions/MaterialAssignment-swift.struct/init(front:back:extrusion:frontChamfer:backChamfer:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation12MeshResourceC21ShapeExtrusionOptionsV18MaterialAssignmentV5front4back9extrusion0J7Chamfer0kM0AGs6UInt32V_A4Ntcfc"
  },
  "title" : "init(front:back:extrusion:frontChamfer:backChamfer:)"
}
-->

# init(front:back:extrusion:frontChamfer:backChamfer:)

Creates a material assignment structure with options for each side of an extruded shape.

```
init(front: UInt32 = 0, back: UInt32 = 0, extrusion: UInt32 = 0, frontChamfer: UInt32 = 0, backChamfer: UInt32 = 0)
```

## Parameters

`front`

The material index for the front face of the shape.

`back`

The material index for the back face of the shape.

`extrusion`

The material index for the extruded faces of the shape.

`frontChamfer`

The material index for the chamfered edges between the front and sides of the shape.

`backChamfer`

The material index for the chamfered edges between the back and sides of the shape.

## Discussion

The default for any omitted parameter is `0`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)