public static void SetSourceDefaultSettings(AudioSource source, AudioType type = AudioType.Sound)
        {
            float volume = 1.0f;

            if (type == AudioType.Sound)
            {
                volume = GameSettingsPrefs.Get <float>("sound");

                source.loop = false;
            }
            else if (type == AudioType.Music)
            {
                volume = GameSettingsPrefs.Get <float>("music");

                source.loop = true;
            }

            source.clip = null;

            source.volume                = volume;
            source.pitch                 = 1.0f;
            source.spatialBlend          = 0; // 2D Sound
            source.mute                  = false;
            source.playOnAwake           = false;
            source.outputAudioMixerGroup = null;
        }
 public static float GetSoundVolume()
 {
     return(GameSettingsPrefs.Get <float>("sound"));
 }
 public static float GetMusicVolume()
 {
     return(GameSettingsPrefs.Get <float>("music"));
 }