public void SetCharacterBox(DisplayCharacterInfo[] displayCharacterInfos, int phraseIndex) { var characterInfos = displayCharacterInfos.Where(info => info.phraseIndexs.Contains(phraseIndex)).ToList(); if (characterInfos.Count > 0) { ClearBox(); for (int i = 0; i < characterInfos.Count; i++) { CharacterPanel panel = null; if (_cacheCharacterPanelList.Count > i) { panel = _cacheCharacterPanelList[i]; } else { panel = ResourceManager.Instance.InstantiateViewParts <CharacterPanel>(_content); _cacheCharacterPanelList.Add(panel); } panel.SetPanel(characterInfos[i]); } } }