<!--
{
  "availability" : [
    "iOS: 18.4.0 -",
    "iPadOS: 18.4.0 -",
    "macCatalyst: -",
    "macOS: 15.4.0 -",
    "tvOS: 18.4.0 -",
    "visionOS: 2.4.0 -",
    "watchOS: 11.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "hvf",
  "identifier" : "/documentation/hvf/CustomPartLoader",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "hvf"
    ],
    "preciseIdentifier" : "s:3hvf16CustomPartLoadera"
  },
  "title" : "CustomPartLoader"
}
-->

# CustomPartLoader

Closure which loads parts from an arbitrary source
The first parameter is the part index which uniquely identifiers a part; these are assigned by the loader
The second parameter is a PartGenerator the loader uses to get a ShapeWriter or CompositeWriter to create the requested part
The result is the generated part, passed back in a PartResult

```
typealias CustomPartLoader = (Int, any PartGenerator) -> PartResult
```

---

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)