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

# USDLayer.Spec.FieldCollection

Low-level read/write access to spec fields. Fields are the raw data
backing both metadata and structural information on a spec.

```
protocol FieldCollection
```

## Topics

### Instance Properties

[`var fields: [USDToken]`](/documentation/USDKit/USDLayer/Spec/FieldCollection/fields)

All authored field names on this spec.

### Instance Methods

[`func clearField(USDToken) -> Bool`](/documentation/USDKit/USDLayer/Spec/FieldCollection/clearField(_:))

Clears the authored value for `name`.

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

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

[`func field<T>(USDToken, as: T.Type) -> T?`](/documentation/USDKit/USDLayer/Spec/FieldCollection/field(_:as:))

Typed field accessor.

[`func isInert(ignoringChildren: Bool) -> Bool`](/documentation/USDKit/USDLayer/Spec/FieldCollection/isInert(ignoringChildren:))

Returns a Boolean value that indicates whether the spec contains
no authored data.

[`func setField(USDToken, to: USDValue) -> Bool`](/documentation/USDKit/USDLayer/Spec/FieldCollection/setField(_:to:)-26nys)

Sets the field `name` to `value`.

[`func setField<T>(USDToken, to: T) -> Bool`](/documentation/USDKit/USDLayer/Spec/FieldCollection/setField(_:to:)-4lcqw)

Typed field setter.

## Relationships

### Conforming Types

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

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

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

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

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

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

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

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

---

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)