Namespace OdinNative.Unity
Classes
OdinBanner
OdinCrypto
Wrapper class of OdinNative.Wrapper.Crypto for Unity.
This convenient class provides predefined encryption helper functions for Unity. If Peers do not have the same cipher they can not communicate with each other besides some events.
OdinDecoder
Wrapper class of OdinNative.Wrapper.MediaDecoder for Unity (requires AudioSource)
This convenient class provides predefined helper functions to cover default use cases where the voice chat needs to work with AudioSource, AudioClip, AudioMixer, ...
Default Unity GameObject altering functions:
- OdinNative.Unity.OdinDecoder.AddApm()Add OdinNative.Unity.Audio.OdinApmComponent to the current GameObject
- OdinNative.Unity.OdinDecoder.AddVad()Add OdinNative.Unity.Audio.OdinVadComponent to the current GameObject
- OdinNative.Unity.OdinDecoder.AddVi()Add OdinNative.Unity.Audio.OdinViComponent to the current GameObject
- OdinNative.Unity.OdinDecoder.AddVolumeBoost()Add OdinNative.Unity.Audio.OdinVolumeBoostComponent to the current GameObject
- OdinNative.Unity.OdinDecoder.AddMute()Add OdinNative.Unity.Audio.OdinMuteAudioComponent to the current GameObject
OdinEncoder
Freestanding encoder component that captures audio from an OdinNative.Unity.OdinEncoder.AudioProvider and sends it to an OdinNative.Unity.OdinRoom.
Place this anywhere in the scene. Assign OdinNative.Unity.OdinEncoder.Room and optionally an OdinNative.Unity.OdinEncoder.AudioProvider
(OdinNative.Unity.Audio.OdinMicrophoneReader or OdinNative.Unity.Audio.OdinAudioReader). Audio can also be pushed manually
via OdinNative.Unity.OdinEncoder.PushAudio(System.Single[],System.Int32,System.Boolean) wired through an Inspector UnityEvent or called directly.
Default behaviour:
- OdinNative.Unity.OdinEncoder.CreateEncoder()Called automatically when the room is joined
OdinNative.Unity.OdinEncoder.PushAudio(System.Single[],System.Int32,System.Boolean)Subscribed to OdinNative.Unity.OdinEncoder.AudioProviderOnAudioDatawhen set
OdinPeer
Wrapper class of OdinNative.Wrapper.PeerEntity for Unity
This convenient class provides dispatching of events to Unity with passthrough UnityEngine.Events.UnityEvent
as well as predefined helper functions to cover default use cases where the voice chat is visually and logically represented by
Unity gameobjects that are manageable with the Unity editor.
Default Unity GameObject altering event callback functions:
OdinNative.Unity.OdinPeer.Peer_DecoderAdded(System.Object,OdinNative.Unity.Events.DecoderAddedEventArgs)Creates GameObject with OdinNative.Unity.OdinDecoder component and attach mediaOdinNative.Unity.OdinPeer.Peer_DecoderRemoved(System.Object,OdinNative.Unity.Events.DecoderRemovedEventArgs)Destroy GameObject with OdinNative.Unity.OdinDecoder component
OdinRoom
Wrapper class of OdinNative.Wrapper.Room.Room for Unity.
This convenient class provides dispatching of events to Unity with passthrough UnityEngine.Events.UnityEvent
as well as predefined helper functions to cover default use cases where the voice chat is visually and logically represented by
Unity gameobjects that are manageable with the Unity editor like Context menu, Inspector and/or Hierarchy window.
Default Unity GameObject altering event callback functions:
OdinNative.Unity.OdinRoom.PeerJoinedCreateComponent(System.Object,OdinNative.Wrapper.Room.PeerJoinedEventArgs)Creates GameObject with OdinNative.Unity.OdinPeer componentOdinNative.Unity.OdinRoom.PeerLeftRemoveComponent(System.Object,OdinNative.Wrapper.Room.PeerLeftEventArgs)Destroy GameObject with OdinNative.Unity.OdinPeer componentOdinNative.Unity.OdinRoom.RoomStatusState(System.Object,OdinNative.Wrapper.Room.RoomStateChangedEventArgs)Destroy this components GameObject if the connection is closed i.e cleanup
OdinSocket
Wrapper class of OdinNative.Wrapper.Socket.Socket for Unity
This convenient class provides dispatching of events to Unity with passthrough UnityEngine.Events.UnityEvent
as well as predefined helper functions to cover default use cases.