Play Pause Audio in unity3d

Subscribers:
1,110
Published on ● Video Link: https://www.youtube.com/watch?v=AMYA0DiC1Zs



Duration: 2:44
45 views
5


ASSALAM o alaikum In this video we have shown how to play or pause audio in unity3d

Code :

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SoundManager : MonoBehaviour
{
public AudioSource audioSource;

// Start is called before the first frame update
void Start()
{

}

// Update is called once per frame
void Update()
{

}

public void PlayAudio()
{
audioSource.Play();
}

public void PauseAudio()
{
audioSource.Pause();
}

}


/*
/////////////////////////////////////////////////////////////////////////////////////////////
ASSALAM o alaikum
All codes and concepts and videos from this channel are non copyrighted and free to use because we believe that knowledge should be freely available for everyone
/////////////////////////////////////////////////////////////////////////////////////////////
*/







Tags:
unity
unity3d
unityd
learn unity
unity tutorials
unity programming
unity coding
audio in unity
play audio in unity
play sound in unity
play sound in unity3d
play sound in unity2d
pause audio in unity
play pause audio in unity