Developer Documentation

OdinPeer.AddMediaComponent

public OdinMedia AddMediaComponent(GameObject containerObject, ushort mediaId, bool enable = true)
public OdinMedia AddMediaComponent(GameObject containerObject, ushort mediaId, uint samplerate, bool stereo, bool enable = true)

Create a Unity component

Parameters

NameTypeDescription
containerObjectGameObjectgameobject where the component will be added
mediaIdUInt16id of
enableBooleanflag if the new component is enabled
samplerateUInt32decoder samplerate
stereoBooleandecoder channel flag

Returns

TypeDescription
OdinMediacreated component

Variants

AddMediaComponent(containerObject, mediaId, enable)

public OdinMedia AddMediaComponent(GameObject containerObject, ushort mediaId, bool enable = true)

Create a Unity component

Parameters

NameTypeDescription
containerObjectGameObjectgameobject where the component will be added
mediaIdUInt16id of
enableBooleanflag if the new component is enabled

Returns

TypeDescription
OdinMediacreated component

AddMediaComponent(containerObject, mediaId, samplerate, stereo, enable)

public OdinMedia AddMediaComponent(GameObject containerObject, ushort mediaId, uint samplerate, bool stereo, bool enable = true)

Create a Unity component

Parameters

NameTypeDescription
containerObjectGameObjectgameobject where the component will be added
mediaIdUInt16id of
samplerateUInt32decoder samplerate
stereoBooleandecoder channel flag
enableBooleanflag if the new component is enabled

Returns

TypeDescription
OdinMediacreated component