Our new developer documentation is now available. Please check it out!
OdinHandler.AddPlaybackComponent
Warning
Version 1.1.0 is deprecated and will be removed in the future and is not being supported for new users. Please update to the latest version as soon as possible.
public PlaybackComponent AddPlaybackComponent(string gameObjectTag, string roomName, ulong peerId, long mediaStreamId, bool autoDestroySource = true)
public PlaybackComponent AddPlaybackComponent(GameObject peerContainer, string roomName, ulong peerId, long mediaStreamId, bool autoDestroySource = true)
Tries to identifiy a gameobject by tag to assign the PlaybackComponent
Parameters
Name | Type | Description |
---|---|---|
gameObjectTag | String | Tag string to find with FindGameObjectsWithTag |
roomName | String | PlaybackComponent room |
peerId | UInt64 | PlaybackComponent peer |
mediaStreamId | Int64 | PlaybackComponent media |
autoDestroySource | Boolean | optionally enable or disable on destroy of PlaybackComponent the destroy of the linked AudioSource |
peerContainer | GameObject | GameObject to attach to |
Returns
Type | Description |
---|---|
PlaybackComponent | ScriptReference of |
Variants
AddPlaybackComponent(gameObjectTag, roomName, peerId, mediaStreamId, autoDestroySource)
public PlaybackComponent AddPlaybackComponent(string gameObjectTag, string roomName, ulong peerId, long mediaStreamId, bool autoDestroySource = true)
Tries to identifiy a gameobject by tag to assign the PlaybackComponent
Parameters
Name | Type | Description |
---|---|---|
gameObjectTag | String | Tag string to find with FindGameObjectsWithTag |
roomName | String | PlaybackComponent room |
peerId | UInt64 | PlaybackComponent peer |
mediaStreamId | Int64 | PlaybackComponent media |
autoDestroySource | Boolean | optionally enable or disable on destroy of PlaybackComponent the destroy of the linked AudioSource |
Returns
Type | Description |
---|---|
PlaybackComponent | ScriptReference of |
AddPlaybackComponent(peerContainer, roomName, peerId, mediaStreamId, autoDestroySource)
public PlaybackComponent AddPlaybackComponent(GameObject peerContainer, string roomName, ulong peerId, long mediaStreamId, bool autoDestroySource = true)
Adds a new PlaybackComponent to the specified GameObject
Parameters
Name | Type | Description |
---|---|---|
peerContainer | GameObject | GameObject to attach to |
roomName | String | PlaybackComponent room |
peerId | UInt64 | PlaybackComponent peer |
mediaStreamId | Int64 | PlaybackComponent media |
autoDestroySource | Boolean | optionally enable or disable on destroy of PlaybackComponent the destroy of the linked AudioSource |
Returns
Type | Description |
---|---|
PlaybackComponent | ScriptReference of |