Developer Documentation

Classes

The Unity SDK consists of these classes:

Unity Components

You typically interact with these components directly in the Unity Editor. Check out the manual on how to use these components in the Unity editor.

ComponentDescription
OdinApmComponentAudioProcessingModule component for Media

This class provides configuration for the native implemented audio processing. The supported processor/filter are applicable to Media which must be set.

OdinAudioReaderHandles audioclip input data and sends input to ODIN

This convenient class gathers input audio data from Unity to pass the data with OdinAudioReader event to other components.

OdinBanner
OdinConnectionWrapper class of Odin connections

This convenient class provides dispatching of events to Unity with passthrough to support multiple rooms on fewer connections.

OdinCustomEffectUnityComponentBaseCustom base component for Media

This convenient class provides effect template with a passthrough of custom userdata on a callback. The abstract representation of a base custom effect is to simplify implementation of Audio as a Unity component. (see other predefined custom effects)

OdinMediaWrapper class of Odin for Unity (require AudioSource)

This convenient class provides predefined helper functions to cover for a default usecases where the voice chat needs to work with AudioSource, AudioClip, AudioMixer, …

Default Unity GameObject altering functions:
  • OdinMediaAdd OdinMuteAudioComponent to the current GameObject
OdinMicrophoneReaderHandles microphone input data and sends input to ODIN

This convenient class gathers input audio data from Unity managed Microphone to pass the data with OdinMicrophoneReader event to other components.

OdinPeerWrapper class of Odin for Unity

This convenient class provides dispatching of events to Unity with passthrough as well as predefined helper functions to cover for a default usecases where the voice chat is visually and logical represented Unity gameobject that are manageable with the Unity editor.

Default Unity GameObject altering event callback functions:
  • Unity component
OdinRoomWrapper class of Room for Unity.

This convenient class provides dispatching of events to Unity with passthrough as well as predefined helper functions to cover for a default usecases where the voice chat is visually and logical represented Unity gameobject that are manageable with the Unity editor like Context menu, Inspector and/or Hierarchy window.

Default Unity GameObject altering event callback functions:
  • ConnectionStatusState(SystemDestroy this components GameObject if the connection is closed i.e cleanup
OdinVadComponentVoiceActivity component for Media

This class provides configuration for the native implemented voice detection. Supports speech recognition and/or a volume threshold.

Utility Classes

Many of these classes are used internally or you rarely need to work with these.

ComponentDescription
ApmEffectVoiceActivity effect for Odin
ArrayEnumerable
ConnectionStateChangedEventArgsArguments for ConnectionStateChanged events in the current room
ConnectionStateChangedProxyThis class provides the base functionality for UnityEvents based Room. A persistent callback that can be saved with the Scene. Unity Inspector event wrapper (UnityEvent)
CustomEffectCustom effect for Odin callbacks
DatagramEventArgsArguments for datagram events
DatagramProxyThis class provides the base functionality for UnityEvents based Room. A persistent callback that can be saved with the Scene. Unity Inspector event wrapper (UnityEvent)
MapEnumerable
MediaActiveStateChangedEventArgsArguments for MediaActiveStateChanged events in the current room
MediaActiveStateChangedProxyThis class provides the base functionality for UnityEvents based Room. A persistent callback that can be saved with the Scene. Unity Inspector event wrapper (UnityEvent)
MediaAddedEventArgsArguments for MediaAdded events in the current room
MediaAddedProxyThis class provides the base functionality for UnityEvents based Room. A persistent callback that can be saved with the Scene. Unity Inspector event wrapper (UnityEvent)
MediaDecoderOdin Playback Media
MediaEncoderOdin Capture Media
MediaPipelineOdin audio pipeline
MediaRemovedEventArgsArguments for MediaRemoved events in the current room
MediaRemovedProxyThis class provides the base functionality for UnityEvents based Room. A persistent callback that can be saved with the Scene. Unity Inspector event wrapper (UnityEvent)
MediaRpcPropertiesarbitrary media data
MessagePackReaderException
MessageReceivedEventArgsArguments for MessageReceived events in the current room
MessageReceivedProxyThis class provides the base functionality for UnityEvents based Room. A persistent callback that can be saved with the Scene. Unity Inspector event wrapper (UnityEvent)
MsgPackTokenhttps://github.com/msgpack/msgpack/blob/master/spec.md
MsgPackWriterRudimentary Msgpack implementation that will be used for sending RPC to the server.
NativeBindingsC# bindings for the native ODIN runtime
NotificationMsgpack RPC spec https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md
OdinAudioData
OdinAudioMediaCallbackMarshal
OdinAudioMediaMarshal
OdinCallbackAudioData
OdinClientClient Wrapper for ODIN ffi OdinNative.Core.OdinLibrary.NativeMethods
OdinColliderFilterComponentCustom filter by collider component for Media

This class is a effect in the odin audio pipline to mute audio based on GameObject collisions in Unity space. The effect can help to trigger specific audio packets quickly without the adjustment of Server-side positions.

OdinConnectionPoolHandle
OdinDecoderHandle
OdinDefaultsODIN default configuration
OdinEncoderHandle
OdinExceptionException type for the native ODIN runtime
OdinLibraryMain lib entry class
OdinLibraryParametersA set of values that are used when initializing the native ODIN runtime
OdinMediaData
OdinMuteAudioComponentCustom mute audio component for Media

This class is a effect in the odin audio pipline to mute based on the OdinMuteAudioComponent flag. The intention is to provide a convenient way with Unity Editor UI of Marshal a 1-byte signed integer bool for a specific audio packet in the current pipline.

OdinPipelineHandle
OdinRoomHandle
OdinTerrainFilterComponentCustom filter by terrain component for Media

This class is a effect in the odin audio pipline to mute audio based on location of a GameObject relative to a terrain type in Unity space. Note that the default implementation is Unity specific on a 2D calculation with X, Z and is not useful in all occlusions.

OdinTokenGeneratorHandle
OdinVolumeBoostComponentCustom volume scale component for Media

This class is a effect in the odin audio pipline to scale each sample individually in the buffer.

OdinVolumeComponentCustom volume component for Media. Recommend the use of AudioSource.volume or AudioMixer/AudioMixerGroup instead

This class is a effect in the odin audio pipline to change audio buffers by amplify the volume level.

PeerEntityClient/Remote peer
PeerJoinedEventArgsArguments for PeerJoined events in the current room
PeerJoinedProxyThis class provides the base functionality for UnityEvents based Room. A persistent callback that can be saved with the Scene. Unity Inspector event wrapper (UnityEvent)
PeerLeftEventArgsArguments for PeerLeft events in the current room
PeerLeftProxyThis class provides the base functionality for UnityEvents based Room. A persistent callback that can be saved with the Scene. Unity Inspector event wrapper (UnityEvent)
PeerUserDataChangedEventArgsArguments for PeerUserDataChanged events in the current room
PeerUserDataChangedProxyThis class provides the base functionality for UnityEvents based Room. A persistent callback that can be saved with the Scene. Unity Inspector event wrapper (UnityEvent)
PiplineEffect
RequestMsgpack RPC spec https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md
ResponseMsgpack RPC spec https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md
RoomMain Room
RoomCollectionIntern room dictionary
RoomJoinEventArgsArguments for RoomJoin events right before the room is joined
RoomJoinProxyThis class provides the base functionality for ODIN SDK UnityEvents. A persistent callback that can be saved with the Scene.
RoomJoinedEventArgsArguments for RoomJoined events when the room was joined successfully
RoomJoinedProxyThis class provides the base functionality for ODIN SDK UnityEvents. A persistent callback that can be saved with the Scene.
RoomLeaveEventArgsArguments for RoomLeave events right before the room handle is destroyed
RoomLeaveProxyThis class provides the base functionality for ODIN SDK UnityEvents. A persistent callback that can be saved with the Scene.
RoomLeftEventArgsArguments for RoomLeft events when the room handle was destroyed
RoomLeftProxyThis class provides the base functionality for ODIN SDK UnityEvents. A persistent callback that can be saved with the Scene.
RoomUserDataChangedEventArgsArguments for RoomUserDataChanged events in the current room
RoomUserDataChangedProxyThis class provides the base functionality for UnityEvents based Room. A persistent callback that can be saved with the Scene. Unity Inspector event wrapper (UnityEvent)
RpcEventArgsArguments for rpc events
RpcFormatMsgpack RPC spec https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md
RpcProxyThis class provides the base functionality for UnityEvents based Room. A persistent callback that can be saved with the Scene. Unity Inspector event wrapper (UnityEvent)
RpcResultResult of send rpc responses
msgid, (method, params, error, result)
UnityAudioData
UnityCreatedMediaObject
UnityDeleteMediaObjectUnity Inspector event wrapper (UnityEvent)
UserDataOdin UserData helper for marshal byte arrays
Utility
VadEffectVoiceActivity effect for Odin