Legacy Documentation: Version 2017.1 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

VideoPlayer.GetTargetAudioSource

public AudioSource GetTargetAudioSource(ushort trackIndex);

Parameters

trackIndex Index of the audio track for which the AudioSource is wanted.

Returns

AudioSource The source associated with the audio track.

Description

Gets the AudioSource that will receive audio samples for the specified track if VideoPlayer.audioOutputMode is set to VideoAudioOutputMode.AudioSource.

Did you find this page useful? Please give it a rating: