<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/MeshResource/expectedMaterialCount",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation12MeshResourceC21expectedMaterialCountSivp"
  },
  "title" : "expectedMaterialCount"
}
-->

# expectedMaterialCount

The number of material entries required to render the mesh resource.

```
@MainActor @preconcurrency var expectedMaterialCount: Int { get }
```

## Discussion

Use this value to determine the number of [`Material`](/documentation/RealityKit/Material) instances to
provide in the [`materials`](/documentation/RealityKit/ModelComponent/materials) array. When a mesh has
multiple submeshes, each submesh references a material by index.

---

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)