<!--
{
  "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/USDLayer/Spec/MetadataCollection",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "USDKit"
    ],
    "preciseIdentifier" : "s:6USDKit8USDLayerV4SpecV18MetadataCollectionP"
  },
  "title" : "USDLayer.Spec.MetadataCollection"
}
-->

# USDLayer.Spec.MetadataCollection

Read/write access to metadata stored on a spec.

```
protocol MetadataCollection
```

## Topics

### Instance Properties

[`var infoKeys: [USDToken]`](/documentation/USDKit/USDLayer/Spec/MetadataCollection/infoKeys)

All authored info keys on this spec, including structural fields
(child specifier lists, type info, etc.).

[`var isDormant: Bool`](/documentation/USDKit/USDLayer/Spec/MetadataCollection/isDormant)

Whether the spec is dormant (the underlying data has been removed).

[`var layer: USDLayer?`](/documentation/USDKit/USDLayer/Spec/MetadataCollection/layer)

The layer containing this spec, or `nil` if dormant.

[`var metadataInfoKeys: [USDToken]`](/documentation/USDKit/USDLayer/Spec/MetadataCollection/metadataInfoKeys)

The subset of info keys an inspector should treat as user-visible
metadata. Excludes structural fields.

[`var path: USDLayer.Path`](/documentation/USDKit/USDLayer/Spec/MetadataCollection/path)

The path identifying this spec within its layer.

[`var specType: USDLayer.SpecType?`](/documentation/USDKit/USDLayer/Spec/MetadataCollection/specType)

The kind of spec, or `nil` if the spec is dormant.

### Instance Methods

[`func clearInfo(USDToken)`](/documentation/USDKit/USDLayer/Spec/MetadataCollection/clearInfo(_:))

Clears the authored value for `key`.

[`func info(USDToken) -> USDValue?`](/documentation/USDKit/USDLayer/Spec/MetadataCollection/info(_:))

Returns the value of `key`, or `nil` if the key is unauthored.

[`func setInfo(USDToken, to: USDValue)`](/documentation/USDKit/USDLayer/Spec/MetadataCollection/setInfo(_:to:))

Sets `key` to `value`.

## Relationships

### Conforming Types

[`Spec`](/documentation/USDKit/USDPrim/Attribute/Spec)

[`Spec`](/documentation/USDKit/USDPrim/Relationship/Spec)

[`Spec`](/documentation/USDKit/USDPrim/Property/Spec)

[`Spec`](/documentation/USDKit/USDLayer/Spec)

[`Spec`](/documentation/USDKit/USDPrim/Spec)

[`PseudoRootSpec`](/documentation/USDKit/USDPrim/PseudoRootSpec)

[`VariantSpec`](/documentation/USDKit/USDPrim/VariantSpec)

[`VariantSetSpec`](/documentation/USDKit/USDPrim/VariantSetSpec)

---

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)