Audio System

Other topics

Audio class - Play audio

using UnityEngine;

public class Audio : MonoBehaviour {
    AudioSource audioSource;
    AudioClip audioClip;
    
    void Start() {
        audioClip = (AudioClip)Resources.Load("Audio/Soundtrack");
        audioSource.clip = audioClip;
        if (!audioSource.isPlaying) audioSource.Play();
    }

Contributors

Topic Id: 8064

Example Ids: 26021

This site is not affiliated with any of the contributors.