public bool IsFileReferenced(string filepath) { if (referenced_guids.Contains(UnityAssetFile.GetGUID(filepath))) { return(true); } return(false); }
public string GetGUID() { if (guid.IsBlank()) { guid = UnityAssetFile.GetGUID(GetPath()); } return(guid); }
private void HighlightInEditor(object projectPathObj) { var projectPath = projectPathObj as string; var assetPath = UnityAssetFile.IsMetaFile(projectPath) ? UnityAssetFile.AssetPathFromMetaFilePath(projectPath) : projectPath; var resource = AssetDatabase.LoadMainAssetAtPath(assetPath); if (resource) { EditorGUIUtility.PingObject(resource); } }
public void ValidateFiles(string filepath) { UnityAssetFile.GetUnityAssetFiles(filepath) .Process(p => ValidateFile(p)); }
public int PurgeOrphans(string filepath) { return(UnityAssetFile.GetUnityAssetFiles(filepath) .Skip(p => IsFileReferenced(p)) .ProcessAndCount(p => File.Delete(p))); }
public void LoadReferences(string filepath) { UnityAssetFile.GetUnityAssetFiles(filepath) .Process(p => LoadReferencesFromFile(p)); }