---
title: "init(_:timeCode:allowsHitTesting:)"
framework: usdkit
role: symbol
role_heading: Initializer
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: "usdkit/usdstagecomponent/init(_:timecode:allowshittesting:)"
---

# init(_:timeCode:allowsHitTesting:)

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

## Declaration

```swift
@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

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.

## See Also

### Creating a stage component

- [init(allowsHitTesting:)](usdkit/usdstagecomponent/init(allowshittesting:).md)
