Overview
The ODIN Unity SDK provides prefabs and components that allow you to quickly embed true 3D positional real-time audio into your game with ease. It also supports 2D non-spatial voice chat like in phone calls or radio communication.
Important Notice: Please be aware that our SDK version 2.0.0 is currently in a pre-release testing phase. It has not been officially released yet. We are rigorously testing it both internally and with a select group of external customers to ensure its quality and reliability. As a result, please note that the documentation for this version is still under development and may not be comprehensive. Information and features in the SDK are subject to change. We appreciate your understanding and patience during this testing period and welcome any feedback to help us improve. Thank you for your support! You'll find the latest stable version of our SDK here.
Comparison to Previous Versions
When developing version 2 of our SDK, we made a lot of changes to the API and the way you interact with ODIN based on feedback from our customers and our own experiences. Version 1.x made it super easy to quickly implement voice-chat into your game, but it was not very flexible, and it was hard to customize the experience, especially when it came to using more than one room or using 3D audio in use-cases that we had not thought of.
In version 1.x, the central entry point was the OdinHandler
component, which was a singleton and responsible for
everything. It was easy to use, but it was also hard to customize and not very flexible. If you wanted to customize the
experience, you had to create your own handler and copy a lot of code from our handler. This was not user-friendly and
required extensive knowledge of the internals of ODIN.
Getting Started
In version 2.x, you have the choice:
- Using the
OdinRoom
component, which does most of the heavy lifting for you and is very easy to use. It's essentially whatOdinHandler
was before but it's not a singleton anymore, and you can create as many rooms as you want. - You can also dig deep into ODIN using the
Room
object manually in code and create your own experience from scratch. This is very powerful and gives you a lot of flexibility, but it is more complex. SinceOdinRoom
is built on top ofRoom
, you can mix both approaches.
Understanding Spatial and Non-Spatial Voice-Chat
In ODIN, we differentiate between 2D non-spatial voice-chat and 3D spatial voice-chat. 2D non-spatial voice-chat is like in phone calls or radio communication, where everyone hears everyone with the same volume. 3D spatial voice-chat is like in real life, where everyone hears everyone with different volumes and directions depending on their position in the room.
The main difference between 2D and 3D is how you handle events and position the audio in your game. In 2D, you can just
place the audio source wherever you want it, and it will be heard by everyone—just set
the spatialBlend
0.0
(2D sound).
In 3D, you need to attach the audio source representing the microphone of the "remote player" (i.e., a player connected
to the same room) to the position of the remote player in your game (i.e., its avatar). You also need to set
the spatialBlend
1.0
(3D sound).
To do this, you listen to the OdinRoom.OnPeerJoined OdinRoom.OnMediaAdded Room.OnPeerJoined Room.OnMediaStarted OdinRoom
Deciding Which Approach to Use
We've created a quick flowchart to help you decide which approach to use:
We have compiled manuals on these different approaches, please choose one to continue/getting started: