AudioFeedbackPlayer.SetupAudioSource(GameObject) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Ensures an audio source on the GameObject and returns it.
public:
UnityEngine::AudioSource ^ SetupAudioSource(UnityEngine::GameObject ^ targetGameObject);
public UnityEngine.AudioSource SetupAudioSource (UnityEngine.GameObject targetGameObject);
member this.SetupAudioSource : UnityEngine.GameObject -> UnityEngine.AudioSource
Public Function SetupAudioSource (targetGameObject As GameObject) As AudioSource
Parameters
- targetGameObject
- UnityEngine.GameObject
The GameObject to play the desired audio.
Returns
UnityEngine.AudioSource
The AudioSource on the GameObject.