---
title: "init(_:width:height:depth:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/windowplacement/init(_:width:height:depth:)"
---

# init(_:width:height:depth:)

Creates a new window placement with an optional position and 3D size. Depth is ignored on scenes or platforms that don’t support it.

## Declaration

```swift
init(_ position: WindowPlacement.Position? = nil, width: CGFloat? = nil, height: CGFloat? = nil, depth: CGFloat? = nil)
```

## Discussion

Discussion Any values not provided will use use the default values for the Scene that this placement is being applied to.
