public void InsertRange(string name, float value) { float endPosition = value; if (m_DefaultRange == null && m_RangeList.Count == 0) { endPosition = 0.0f; } var range = new LODSliderRange(); range.Name = name; range.Value = value; int insertPosition = 0; for (; insertPosition < m_RangeList.Count; ++insertPosition) { if (m_RangeList[insertPosition].EndPosition < endPosition) { break; } } m_RangeList.Insert(insertPosition, range); }
public LODSlider(bool useDefault = false, string name = "") { if (useDefault == true) { var defaultRange = new LODSliderRange(); defaultRange.Name = name; } }