private object SetSpectrumDynamicRange(float value) { var intValue = (int)value; if (intValue < 1) { intValue = 1; } else if (intValue > 120) { intValue = 120; } _spectrumDynamicRange = intValue; _spectrumAnalyzer.dynamicRange = intValue; PlayerPrefHelper.SetSpectrumDynamicRange(intValue); _spectrumDynamicRangeData.text = intValue.ToString(); return(true); }