<!--
{
  "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/makeAttribute(named:as:custom:variability:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "USDKit"
    ],
    "preciseIdentifier" : "s:6USDKit7USDPrimV13makeAttribute5named2as6custom11variabilityAC0D0VAA8USDTokenV_AJ9ValueTypeVSbAC8PropertyV11VariabilityOtF"
  },
  "title" : "makeAttribute(named:as:custom:variability:)"
}
-->

# makeAttribute(named:as:custom:variability:)

Creates an attribute with the given name on this prim, or returns the
existing attribute if one already exists.

```
@discardableResult func makeAttribute(named name: USDToken, as type: USDPrim.Attribute.ValueType, custom: Bool = true, variability: USDPrim.Property.Variability = .varying) -> USDPrim.Attribute
```

## Parameters

`name`

The name of the attribute to create.

`type`

The value type of the attribute.

`custom`

A Boolean value that indicates whether the attribute is a custom attribute not defined by a schema.

`variability`

The variability of the attribute.

## Return Value

The attribute with the given name.

---

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)