private IEnumerator CallSoundVolumeApi(string url, DelegateAfterGetVolume callback = null) { WWW www = new WWW(url); yield return(www); if (callback != null) { string txt = "10"; if (string.IsNullOrEmpty(www.error)) { txt = www.text; } callback(int.Parse(txt)); } }
public void GetVolume(DelegateAfterGetVolume callback) { var url = Authentication.WebServicePath + "Settings/GetVolume"; StartCoroutine(CallSoundVolumeApi(url, callback)); }