private void OnSearchResult(List <LandSearchInfo> searchInfoLands) { if (landElementViews == null) { return; } using (var iterator = landElementViews.GetEnumerator()) { while (iterator.MoveNext()) { iterator.Current.Value.SetParent(view.GetLandElementsContainer()); iterator.Current.Value.gameObject.SetActive(false); } } for (int i = 0; i < searchInfoLands.Count; i++) { if (!landElementViews.TryGetValue(searchInfoLands[i].id, out LandElementView landView)) { continue; } landView.gameObject.SetActive(true); landView.transform.SetSiblingIndex(i); } view.ResetScrollRect(); }
public void PrefabSetupCorrectly() { Assert.AreEqual(1, view.GetLandElementsContainer().childCount); Assert.NotNull(view.landElementView); }