コード例 #1
0
        public void CanSaveAndLoadReport()
        {
            var projectAuditor = new Unity.ProjectAuditor.Editor.ProjectAuditor();

            var projectReport = projectAuditor.Audit();

            projectReport.Save(k_ReportPath);

            var loadedReport = ProjectReport.Load(k_ReportPath);

            Assert.AreEqual(projectReport.NumTotalIssues, loadedReport.NumTotalIssues);
        }
コード例 #2
0
        void Load()
        {
            var path = EditorUtility.OpenFilePanel("Load from json file", m_SaveLoadDirectory, "json");

            if (path.Length != 0)
            {
                m_LoadButtonAnalytic = ProjectAuditorAnalytics.BeginAnalytic();

                m_ProjectReport = ProjectReport.Load(path);
                m_AnalysisState = AnalysisState.Valid;

                m_SaveLoadDirectory = Path.GetDirectoryName(path);
            }
            OnEnable();

            UpdateAssemblyNames();
            UpdateAssemblySelection();

            // switch to summary view after loading
            SelectView(IssueCategory.MetaData);
        }