C# Class AudioHelper, Imagine_fudge-roll

Inheritance: MonoBehaviour
Show file Open project: Microsoft/Imagine_fudge-roll Class Usage Examples

Public Methods

Method Description
CreateAudioSource ( GameObject obj, AudioClip clip ) : AudioSource

Creates and attaches a new audio source component to the given game object. The audio source will play the audio clip provided.

Method Details

CreateAudioSource() public static method

Creates and attaches a new audio source component to the given game object. The audio source will play the audio clip provided.
public static CreateAudioSource ( GameObject obj, AudioClip clip ) : AudioSource
obj GameObject The game object the audio source component is attached to.
clip UnityEngine.AudioClip The audio clip for the audio source component.
return UnityEngine.AudioSource