private static void HandleEditorStartedCompiling()
        {
            UnityScripsCompileTimeTracker._Data.StartTime = TrackingUtils.GetMilliseconds();

            UnityConsoleCountsByType countsByType = UnityEditorConsoleUtils.GetCountsByType();

            UnityScripsCompileTimeTracker.StoredErrorCount = countsByType.errorCount;
        }
        private static void HandleEditorFinishedCompiling()
        {
            int elapsedTime = TrackingUtils.GetMilliseconds() - UnityScripsCompileTimeTracker._Data.StartTime;

            UnityConsoleCountsByType countsByType = UnityEditorConsoleUtils.GetCountsByType();
            bool hasErrors = (countsByType.errorCount - UnityScripsCompileTimeTracker.StoredErrorCount) > 0;

            UnityScripsCompileTimeKeyframe keyframe = new UnityScripsCompileTimeKeyframe(elapsedTime, hasErrors);

            UnityScripsCompileTimeTracker._Data.AddCompileTimeKeyframe(keyframe);
            UnityScripsCompileTimeTracker.KeyframeAdded.Invoke(keyframe);
        }
Example #3
0
        private static void LogCompileTimeKeyframe(UnityScripsCompileTimeKeyframe keyframe)
        {
            string compilationFinishedLog = "Compilation Finished, Elapsed time : " + TrackingUtils.FormatMSTime(keyframe.elapsedCompileTimeInMS);

            if (keyframe.hadErrors)
            {
                compilationFinishedLog += " (error)";
            }
            Debug.Log("<color=green>Unity Scripts Compiling Completed. </color>" + compilationFinishedLog);
        }