# Integrate SDK into your app

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

> Zoom Video SDK for Unity is in a public beta. [Share your feedback with us](https://zoom.sjc1.qualtrics.com/jfe/form/SV_1IjZoKKENQaXvKK).

The Unity plugin for Video SDK is a wrapper for the Video SDK for Android and the Video SDK for macOS. The platform SDK files are not included in the wrapper. Therefore, you must download the same version of the [Video SDK for Android](/docs/video-sdk/android/), or [Video SDK for macOS](/docs/video-sdk/macos/) from the [Zoom App Marketplace](/docs/build/developer-accounts/) and copy the platform SDK files into the corresponding **Unity Plugin** directory.

## Initialize the SDK

SDK Initialization is required before calling any other functions of the SDK. To initialize the SDK, create an instance of the `ZMVideoSDKInitParams` object and set the domain of the context to "zoom.us". Optionally, you may also enable logging for debugging purposes.

_**Note that you must call the Video SDK from the main thread.**_

```csharp
ZMVideoSDKInitParams initParams = new ZMVideoSDKInitParams();
initParams.domain = "https://zoom.us";
initParams.enableLog = true;
ZMVideoSDK.Instance.Initialize(initParams, (result) => { });
```

### Initialization fields

The following table describes each field in `ZMVideoSDKInitParams`.

| Field                    | Description                                                               |
| ------------------------ | ------------------------------------------------------------------------- |
| `audioRawDataMemoryMode` | `ZoomVideoSDKRawDataMemoryMode`. Raw data buffer exists in heap or stack. |
| `domain`                 | Required. String. The web domain.                                         |
| `enableFullHD`           | Boolean. Only for Oculus devices.                                         |
| `enableLog`              | Optional. Boolean. Enable log.                                            |
| `extendParam`            | `ZoomVideoSDKExtendParams`. For the speaker test file path.               |
| `logFilePrefix`          | String. Log file prefix.                                                  |
| `shareRawDataMemoryMode` | `ZoomVideoSDKRawDataMemoryMode`. Raw data buffer exists in heap or stack. |
| `videoRawDataMemoryMode` | `ZoomVideoSDKRawDataMemoryMode`. Raw data buffer exists in heap or stack. |

_**For more information on how to use the `ZoomVideoSDKRawDataMemoryMode` object, see [Raw Data](/docs/video-sdk/android/raw-data/) in the Video SDK for Android documentation.**_

### Verify initialization

Zoom returns the initialization result from the Native SDK to the the Unity C# wrapper using the callback function. If the SDK initialization is not successful, see the SDK error code for details.

### Initialize with debug log

You can enable the debug log feature when initializing the SDK with the following method:

```csharp
ZMVideoSDKInitParams initParams = new ZMVideoSDKInitParams();
initParams.domain = "https://zoom.us";
initParams.enableLog = true;
ZMVideoSDK.Instance.Initialize(initParams, (result) => { });
```

Once you've initialized the log feature, the SDK creates an encrypted log file in the corresponding Native SDK log location.

## Listen for callback events

The `IZMVideoSDKDelegate` allows you to subscribe to callback events that provide status updates on the operations performed in your app that are related to the Video SDK. For example, you might want to be notified when a user has successfully joined or left a session.

```csharp
IZMVideoSDKDelegate ZMDelegate = new ZMVideoSDKDelegateImpl(this);
```

### Add a listener

To subscribe to events, you must define your own instance of the `ZMVideoSDKDelegate` object and you must add it to the SDK by calling the `AddListener` function.

```csharp
ZMVideoSDK.Instance.AddListener(ZMDelegate);
```

### Remove a listener

To unsubscribe to events, call `RemoveListener`.

```csharp
ZMVideoSDK.Instance.RemoveListener(ZMDelegate);
```
