public void UpdatePatternList() { //clear list _patterns.Clear(); //valid target check if (target == null) { return; } int index = _cornerlist.index; if (_corners.Count <= 0 || index < 0 || index >= _cornerlist.count) { return; } //fill list target.AddCornerPatternsToList(_corners[index], _patterns); }