---
title: "add(to:from:layerOffset:position:)"
framework: usdkit
role: symbol
role_heading: Instance Method
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: "usdkit/usdprim/payloadcollection/add(to:from:layeroffset:position:)"
---

# add(to:from:layerOffset:position:)

Adds an external payload arc.

## Declaration

```swift
func add(to primPath: USDLayer.Path?, from assetPath: String, layerOffset: USDLayer.TimeOffset = .init(), position: USDPrim.ListPosition = .backOfPrependList) throws
```

## Parameters

- `primPath`: The prim path within the target asset. Pass nil to target the asset’s default prim.
- `assetPath`: The asset path of the external layer to load.
- `layerOffset`: Time offset and scale to apply during composition.
- `position`: Where to insert the payload in the prim’s payload list.

## Discussion

Discussion note: An error if the payload cannot be added.
