<!--
{
  "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/Attribute/Spec/init(layer:attributePath:typeName:variability:isCustom:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "USDKit"
    ],
    "preciseIdentifier" : "s:6USDKit7USDPrimV9AttributeV4SpecV5layer13attributePath8typeName11variability8isCustomAGSgAA8USDLayerV_AO0G0VAE9ValueTypeVAC8PropertyV11VariabilityOSbtcfc"
  },
  "title" : "init(layer:attributePath:typeName:variability:isCustom:)"
}
-->

# init(layer:attributePath:typeName:variability:isCustom:)

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

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

## Parameters

`layer`

The layer that owns the new attribute.

`attributePath`

The full path of the attribute to author.

`typeName`

The attribute’s value type.

`variability`

The attribute’s variability.

`isCustom`

Whether the attribute 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)