/// <summary> /// Deinitialization method /// </summary> public void Deinitialize() { variants.PageChanged -= VariantsOnPageChanged; for (var i = 0; i < elementsPerPage; i++) { elementPanels[i].Deinitialize(); Destroy(elementPanels[i].gameObject); } elementPanels = null; variants.Clear(); }