# CreateAsync

> Asynchronously creates an instance of a PhotoCapture object that can be used to capture photos.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Windows.WebCam](/engine/6000.6/script-reference/unityengine/windows/webcam.md)
* **Assembly:** UnityEngine.CoreModule

## CreateAsync(bool, OnCaptureResourceCreatedCallback)

Asynchronously creates an instance of a PhotoCapture object that can be used to capture photos.

```csharp
public static void CreateAsync(bool showHolograms, PhotoCapture.OnCaptureResourceCreatedCallback onCreatedCallback)
```

### Parameters

**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Will allow you to capture holograms in your photo.**** (\[OnCaptureResourceCreatedCallback]\(/engine/6000.6/script-reference/unityengine/windows/webcam/photocapture/oncaptureresourcecreatedcallback)): This callback will be invoked when the PhotoCapture instance is created and ready to be used.

### Remarks

If the instance failed to be created, the instance returned will be null. Capturing holograms is currently disabled therefore the showHolograms parameter will be ignored.

## CreateAsync(OnCaptureResourceCreatedCallback)

Asynchronously creates an instance of a PhotoCapture object that can be used to capture photos.

```csharp
public static void CreateAsync(PhotoCapture.OnCaptureResourceCreatedCallback onCreatedCallback)
```

### Parameters

**** (\[OnCaptureResourceCreatedCallback]\(/engine/6000.6/script-reference/unityengine/windows/webcam/photocapture/oncaptureresourcecreatedcallback)): This callback will be invoked when the PhotoCapture instance is created and ready to be used.

### Remarks

If the instance failed to be created, the instance returned will be null. Capturing holograms is currently disabled therefore the showHolograms parameter will be ignored.
