namespace YooAsset.Editor { public class ScannerResult { /// /// 生成的报告文件路径 /// public string ReprotFilePath { private set; get; } /// /// 报告对象 /// public ScanReport Report { private set; get; } /// /// 错误信息 /// public string ErrorInfo { private set; get; } /// /// 是否成功 /// public bool Succeed { get { if (string.IsNullOrEmpty(ErrorInfo)) return true; else return false; } } public ScannerResult(string error) { ErrorInfo = error; } public ScannerResult(string filePath, ScanReport report) { ReprotFilePath = filePath; Report = report; ErrorInfo = string.Empty; } /// /// 打开报告窗口 /// public void OpenReportWindow() { if (Succeed) { var reproterWindow = AssetArtReporterWindow.OpenWindow(); reproterWindow.ImportSingleReprotFile(ReprotFilePath); } } } }