> For the complete documentation index, see [llms.txt](https://docs.ggwp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ggwp.com/ggwp-client-sdk/quickstart-guide/unity.md).

# Unity

## Authentication

There are two authentication modes available. Please read about them in detail in the [authentication section](#authentication).

For this guide we will go with the faster & easier auth mode, i.e. static tokens. Please reach out to your account manager to get the tokens.

## Prerequisites

1. Reach out to your GGWP account manager to get the sample app
2. Install UnityHub and download the required dependencies for the sample project; UnityHub will prompt for the same when opening the project

## Vivox

1. Add `vivox` scene from `Assets\Scenes` to the project
2. Replace the tokens in the file `Packages\GGWP VoiceSDK Vivox Setup\Runtime\AuthKey.cs`
3. Please modify the Vivox settings file at `ProjectSettings/Packages/com.unity.services.vivox/Settings.json` to set up your Vivox project settings
4. Run the app and be toxic!
5. Log into the GGWP Dashboard and check the voice incidents

## Epic Online Services (EOS)

1. Add `eos` scene from `Assets\Scenes` to the project
2. Replace the tokens in the file `Packages\GGWP VoiceSDK Vivox Setup\Runtime\AuthKey.cs`

Before building or running the the `eos` scene from the sample app please ensure that the EOS plugin is configured according to the [documentation](https://github.com/PlayEveryWare/eos_plugin_for_unity/blob/stable/com.playeveryware.eos/Documentation~/configure_plugin.md).

In order to test the EOS integration, we need to start at least two clients with different credentials and have them join the lobby. The configuration is based upon the host using the DevAuthTool and the guest using account portal based authentication. Both credentials need to be entitled to join the same lobby and they need to be different usernames for the flow to work end to end.

In order to run the sample app from the `guest.bat` script, **please** **build the `eos` scene and place build artifacts in the `build` directory**.

Finally, due to a bug in EOS, the sample app comes with a patched version of the EOS SDK. If you need to use your own version of EOS SDK, please apply the patchfile below.

```c
From fe3766aa99292d1dd7f261e212a97c9e7ab8a49f Mon Sep 17 00:00:00 2001
Date: Wed, 26 Feb 2025 11:42:25 +0100
Subject: [PATCH] Fix bug in EOS SDK

---
 .../Runtime/EOS_SDK/Generated/RTCAudio/AudioBuffer.cs           | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build-helpers/unity/com.playeveryware.eos/Runtime/EOS_SDK/Generated/RTCAudio/AudioBuffer.cs b/build-helpers/unity/com.playeveryware.eos/Runtime/EOS_SDK/Generated/RTCAudio/AudioBuffer.cs
index 48df3f7..27e6554 100644
--- a/build-helpers/unity/com.playeveryware.eos/Runtime/EOS_SDK/Generated/RTCAudio/AudioBuffer.cs
+++ b/build-helpers/unity/com.playeveryware.eos/Runtime/EOS_SDK/Generated/RTCAudio/AudioBuffer.cs
@@ -45,7 +45,7 @@ namespace Epic.OnlineServices.RTCAudio
 			get
 			{
 				short[] value;
-				Helper.Get(m_Frames, out value, m_FramesCount);
+				Helper.Get(m_Frames, out value, m_FramesCount * m_Channels);
 				return value;
 			}
 
-- 
2.47.1.windows.2
```

## Discord

1. Add `discord` scene from `Assets\Scenes` to the project
2. Replace the tokens and Discord app ID in the file `Packages\GGWP VoiceSDK Discord Setup\Runtime\AuthKey.cs`
3. Run the app and be toxic!
4. Log into the GGWP Dashboard and check the voice incidents.

*Note - during low volume testing, voice incidents may take a minute longer to appear in the GGWP Dashboard due to batch processing in our backend service.*
