<!--
{
  "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/Relationship",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "USDKit"
    ],
    "preciseIdentifier" : "s:6USDKit7USDPrimV12RelationshipV"
  },
  "title" : "USDPrim.Relationship"
}
-->

# USDPrim.Relationship

A property that connects a prim to one or more other objects in the stage by their paths.

```
struct Relationship
```

## Topics

### Structures

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

A handle to a relationship definition stored in a layer.

### Initializers

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

An invalid relationship handle.

[`init?(USDPrim.Property)`](/documentation/USDKit/USDPrim/Relationship/init(_:)-8v165)

Casts a property handle to a relationship handle.

[`init?(USDStage.Object)`](/documentation/USDKit/USDPrim/Relationship/init(_:)-sp7s)

Casts an object handle to a relationship handle.

### Instance Properties

[`var isValid: Bool`](/documentation/USDKit/USDPrim/Relationship/isValid)

A Boolean value indicating whether this relationship is valid.

[`var name: USDToken`](/documentation/USDKit/USDPrim/Relationship/name)

The name of this relationship.

[`var path: USDLayer.Path`](/documentation/USDKit/USDPrim/Relationship/path)

The complete scene path to this relationship, relative to its stage.

[`var prim: USDPrim`](/documentation/USDKit/USDPrim/Relationship/prim)

The nearest prim that contains this relationship.

[`var primPath: USDLayer.Path`](/documentation/USDKit/USDPrim/Relationship/primPath)

The complete path to the nearest prim that contains this relationship.

[`var stage: USDStage`](/documentation/USDKit/USDPrim/Relationship/stage)

The stage that owns this relationship.

[`var targets: [USDLayer.Path]`](/documentation/USDKit/USDPrim/Relationship/targets)

The target paths authored on this relationship.

### Default Implementations

[CustomStringConvertible Implementations](/documentation/USDKit/USDPrim/Relationship/CustomStringConvertible-Implementations)

## Relationships

### Conforms To

[`MetadataCollection`](/documentation/USDKit/USDStage/Object/MetadataCollection)

[`Equatable`](/documentation/Swift/Equatable)

[`Escapable`](/documentation/Swift/Escapable)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Copyable`](/documentation/Swift/Copyable)

---

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)