<!--
{
  "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/USDStageComponent/init(_:timeCode:allowsHitTesting:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "USDKit",
      "RealityKit"
    ],
    "preciseIdentifier" : "s:18_USDKit_RealityKit17USDStageComponentV_8timeCode16allowsHitTestingAC0A00D0V_AH04TimeG0VSbtYacfc"
  },
  "title" : "init(_:timeCode:allowsHitTesting:)"
}
-->

# init(_:timeCode:allowsHitTesting:)

Creates a USDStageComponent in automatic mode and waits for the
first render to complete.

```
@MainActor init(_ stage: USDStage, timeCode: USDStage.TimeCode = .default, allowsHitTesting: Bool = true) async
```

## Parameters

`stage`

The USD stage to render.

`timeCode`

The time code to render at. Defaults to `.default`.

`allowsHitTesting`

Whether to generate collision shapes for hit testing. Defaults to `true`.

## Discussion

In automatic mode, the component manages rendering internally and
updates when the stage or time code changes.

The initializer returns once the stage has been fully processed,
including loading textures and compiling shaders.

---

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)