Skip to main content
Version: 2.x

Namespace OdinNative.Unity

Classes

OdinBanner

OdinConnection

Wrapper class of Odin connections

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

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.

OdinMedia

Wrapper class of OdinNative.Wrapper.MediaDecoder 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:

OdinPeer

Wrapper class of OdinNative.Wrapper.PeerEntity 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:

  • OdinNative.Unity.OdinPeer.Peer_MediaAdded(System.Object,MediaAddedEventArgs) Creates GameObject with OdinNative.Unity.OdinMedia component and attach media
  • OdinNative.Unity.OdinPeer.Peer_MediaRemoved(System.Object,MediaRemovedEventArgs) Destroy GameObject with OdinNative.Unity.OdinMedia component

OdinRoom

Wrapper class of OdinNative.Wrapper.Room.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:

  • OdinNative.Unity.OdinRoom.PeerJoinedCreateComponent(System.Object,PeerJoinedEventArgs) Creates GameObject with OdinNative.Unity.OdinPeer component
  • OdinNative.Unity.OdinRoom.PeerLeftRemoveComponent(System.Object,PeerLeftEventArgs) Destroy GameObject with OdinNative.Unity.OdinPeer component
  • OdinNative.Unity.OdinRoom.RoomStatusState(System.Object,RoomStateChangedEventArgs) Destroy this components GameObject if the connection is closed i.e cleanup