Developer Documentation

OdinHandler

public class OdinHandler : MonoBehaviour

Discussion

Properties

NameTypeDescription
HasConnectionsBooleanTrue if any Room is joined
MicrophoneMicrophoneReaderUnity Component that handles one Microphone where data gets routed through (n) Media
RoomsRoomCollection
OnRoomJoinRoomJoinProxyCalled before an actual room join
OnRoomJoinedRoomJoinedProxyCalled after a room is joined successfully
OnRoomLeaveRoomLeaveProxyCalled before a room leave
OnRoomLeftRoomLeftProxyCalled after a room is destroyed
OnPeerJoinedPeerJoinedProxyCalled on every Peer that joins the room(s) we're connected to
OnPeerUserDataChangedPeerUserDataChangedProxyCalled on every Peer that updates his UserData in the same room(s)
OnPeerLeftPeerLeftProxyCalled on every Peer that left in the same room(s)
OnMediaAddedMediaAddedProxyCalled on every Peer that created a media in the same room(s)
OnMediaRemovedMediaRemovedProxyCalled on every Peer that closed/destroyed one of his own media in the same room(s)
OnMediaActiveStateChangedMediaActiveStateChangedProxyCalled on every activity change of a media in the same room(s)
OnRoomUserDataChangedRoomUserDataChangedProxyCalled on the Room that updates his UserData
OnMessageReceivedMessageReceivedProxyCalled on every Peer that received message from a peer by UInt64%5b%5d%2cSystem
OnConnectionStateChangedConnectionStateChangedProxyCalled on the Room that changed the connection state
OnCreatedMediaObjectUnityCreatedMediaObjectCalled if this OdinHandler created a MediaStream that was requested by the MediaQueue
OnDeleteMediaObjectUnityDeleteMediaObjectCalled if this OdinHandler destroyed a MediaStream that was closed by a remote peer and was requested by the MediaQueue
UnityAudioSourceTagStringIdentify by Unity-Tag to attach a Audio
Use3DAudioBooleanEnable 3D Audio via preset Odin
CreatePlaybackBooleanCreates Room_OnMediaAdded(System events
PlaybackAudioMixerAudioMixer
PlaybackAudioMixerGroupAudioMixerGroup

Static Properties

NameTypeDescription
ConfigOdinEditorConfigStatic reference to the global Unity
InstanceOdinHandlerSingleton reference to this OdinHandler

Public Methods

NameDescription
GetUserData
JoinRoomJoin or create a room by name and attach a Media
LeaveRoomLeave and free the Room by name
AddPlaybackComponentTries to identifiy a gameobject by tag to assign the PlaybackComponent
GetOrCreateMicrophoneStreamReturns the attached Audio
RoomsSetPositionScaleConfigures the allowed 'view' distance for proximity calculation of peers in each room
RoomsUpdatePositionUpdates the two-dimensional position of our own peer in each room
UpdateUserDataUpdates the Rooms
GetRoomGets the room object from Odin
GetPeerGets the a Peer object from a specified room matching a peer ID
GetMediaGet the PlaybackStream of a peer in the room
GetPeersGet all remote peers inside a room
BroadcastMessageSends arbitrary data to a all remote peers in all rooms
GetPlaybackComponentsGets all Audio across all rooms
GetPlaybackComponentGets a Audio
DestroyPlaybackComponentsDestroys all Audio instances