<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "USDKit",
  "identifier" : "/documentation/USDKit/USDPrim/Relationship/Spec/init(layer:relationshipPath:variability:isCustom:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "USDKit"
    ],
    "preciseIdentifier" : "s:6USDKit7USDPrimV12RelationshipV4SpecV5layer16relationshipPath11variability8isCustomAGSgAA8USDLayerV_AN0G0VAC8PropertyV11VariabilityOSbtcfc"
  },
  "title" : "init(layer:relationshipPath:variability:isCustom:)"
}
-->

# init(layer:relationshipPath:variability:isCustom:)

Creates a relationship spec at the given path in the layer,
authoring intermediate ancestor prim specs as `over`s where needed.

```
init?(layer: USDLayer, relationshipPath: USDLayer.Path, variability: USDPrim.Property.Variability = .varying, isCustom: Bool = false)
```

## Parameters

`layer`

The layer that owns the new relationship.

`relationshipPath`

The full path of the relationship to author.

`variability`

The relationship’s variability.

`isCustom`

Whether the relationship is authored as `custom`.

---

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)