private void ElementInsertHandler(int index, BaseListElementData data) { var element = InstantiateElement(data, index); m_elements.Insert(index, element); TryUpdateElementsAnimation(); OnElementsCountChanged.Call(); }
private void Clear() { for (int i = 0; i < m_elements.Count; i++) { DestroyElement(m_elements[i]); } m_elements.Clear(); OnElementsCountChanged.Call(); }
private void ElementAddHandler(BaseListElementData data) { var element = InstantiateElement(data); m_elements.Add(element); TryUpdateElementsAnimation(); OnElementsCountChanged.Call(); }
private void ElementRemoveHandler(int index) { var element = m_elements[index]; m_elements.RemoveAt(index); DestroyElement(element); TryUpdateElementsAnimation(); OnElementsCountChanged.Call(); }
private void RebuildList() { Clear(); foreach (var data in property.value) { var element = InstantiateElement(data); m_elements.Add(element); } TryUpdateElementsAnimation(); OnElementsCountChanged.Call(); }