Legacy Documentation: Version 2018.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.SetTargetAudioSource

public void SetTargetAudioSource(ushort trackIndex, AudioSource source);

Parameters

trackIndexIndex of the audio track to associate with the specified AudioSource.
source AudioSource to associate with the audio track.

Description

Sets the AudioSource that will receive audio samples for the specified track if this audio target is selected with VideoPlayer.audioOutputMode.

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