編輯

共用方式為


AudioFeedbackPlayer.SetupAudioSource(GameObject) Method

Definition

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.

Applies to