Skip to content

Instantly share code, notes, and snippets.

@walkies
Created June 6, 2018 05:37
Show Gist options
  • Save walkies/2e169537c391fe68f3cc48f1726e6133 to your computer and use it in GitHub Desktop.
Save walkies/2e169537c391fe68f3cc48f1726e6133 to your computer and use it in GitHub Desktop.
Volume
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Volume : MonoBehaviour
{
public Slider volumeSlider;
public AudioSource volumeAudio;
public AudioSource menubong;
public void VolumeController()
{
volumeAudio.volume = volumeSlider.value;
}
public void Menubong()
{
menubong.Play();
menubong.pitch++;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment