Check out example codes for "unity master volume changer". It will help you in understanding the concepts better.

Code Example 1

public float masterVolume;

Void Start { 

  AdjustVolume(masterVolume);

}

public void AdjustVolume (float newVolume) {
     AudioListener.volume = newVolume;
 }

Learn ReactJs, React Native from akashmittal.com