public override void Scan() { IEnumerable <string> allAssetPaths = from p in AssetDatabase.GetAllAssetPaths() where ValidatorData.PathInAssetDir(p) select p; IEnumerator <string> enumerator = allAssetPaths.GetEnumerator(); try { while (enumerator.MoveNext()) { string current = enumerator.Current; GameObject gameObject = ValidatorData.LoadAssetAtPath <GameObject>(current); if (!(gameObject != null) || !ReferenceScanner.IsMissingReference(gameObject)) { continue; } this.checklistItem.AddPath(current); } } finally { if (enumerator == null) { } enumerator.Dispose(); } }
public override void Scan() { IEnumerable <string> enumerable = from p in AssetDatabase.GetAllAssetPaths() where ValidatorData.PathInAssetDir(p) select p; foreach (string path in enumerable) { GameObject gameObject = ValidatorData.LoadAssetAtPath <GameObject>(path); if (gameObject != null && ReferenceScanner.IsMissingReference(gameObject)) { this.checklistItem.AddPath(path); } } }