浏览代码

changed for loop to foreach

/4.1
Shan Jiang 4 年前
当前提交
7d1072b1
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 10
      Assets/Scenes/ImageTracking/Multi Prefab - Image Tracking/MultiTrackedImageInfoManager.cs

10
Assets/Scenes/ImageTracking/Multi Prefab - Image Tracking/MultiTrackedImageInfoManager.cs


if (prefabList == null)
{
prefabList = new List<NamedPrefab>();
for (int i = 0; i < library.count; i++)
foreach (var referenceImage in library)
prefabList.Add(new NamedPrefab(library[i], null));
prefabList.Add(new NamedPrefab(referenceImage, null));
for (int i = 0; i < library.count; i++)
foreach (var referenceImage in library)
var listIndex = prefabList.FindIndex(item => item.imageGuid == library[i].guid.ToString());
tempList.Add(new NamedPrefab(library[i], (listIndex != -1) ? prefabList[listIndex].prefab : null));
var listIndex = prefabList.FindIndex(item => item.imageGuid == referenceImage.guid.ToString());
tempList.Add(new NamedPrefab(referenceImage, (listIndex != -1) ? prefabList[listIndex].prefab : null));
}
prefabList = tempList;
}

正在加载...
取消
保存