/// <summary> /// ScrollRect.contentが機能した後に実行する /// </summary> /// <param name="action">実行したい処理</param> /// <returns></returns> private IEnumerator DelayScrollContent(Action action) { ScrollRect scrollRect = m_CarouselToggler.GetComponentInChildren <ScrollRect>(); while (scrollRect.content.rect.width == 0 || Carousels.Any(q => q.Toggle == null)) { yield return(null); } action(); }