---
title: "init(layer:attributePath:typeName:variability:isCustom:)"
framework: usdkit
role: symbol
role_heading: Initializer
path: "usdkit/usdprim/attribute/spec/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 overs where needed.

## Declaration

```swift
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.
