public static void AddDragScrollView() { UIScrollView view = Selection.activeGameObject.GetComponent <UIScrollView>(); foreach (BoxCollider2D box in view.GetComponentsInChildren <BoxCollider2D>(true)) { UIDragScrollView drag = box.gameObject.FindComponent <UIDragScrollView>(); drag.scrollView = view; EditorUtil.SetDirty(drag); Debug.Log("Add DragScrollView for " + box.transform.GetScenePath(), box.gameObject); } foreach (BoxCollider box in view.GetComponentsInChildren <BoxCollider>(true)) { UIDragScrollView drag = box.gameObject.FindComponent <UIDragScrollView>(); drag.scrollView = view; EditorUtil.SetDirty(drag); Debug.Log("Add DragScrollView for " + box.transform.GetScenePath(), box.gameObject); } }
void OnEvalChangeHandler(long board_idx, pe_EvalState state) { m_EvalBoardScroll.GetComponentsInChildren <HeroesEvalItem>().Where(b => b.info.board_idx == board_idx).ToList().ForEach(b => b.ChangeEvalState(state)); }