maint: hotreload updated to 1.13.7

This commit is contained in:
Chris
2026-01-06 22:42:15 -05:00
parent 796dbca5d8
commit 105da8850a
128 changed files with 3538 additions and 738 deletions

View File

@@ -8,6 +8,7 @@ using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using SingularityGroup.HotReload;
using SingularityGroup.HotReload.Editor.Localization;
using SingularityGroup.HotReload.Editor.Util;
using SingularityGroup.HotReload.Newtonsoft.Json;
using UnityEditor;
@@ -275,7 +276,7 @@ namespace SingularityGroup.HotReload.Editor.ProjectGeneration {
try {
pp.OnGeneratedCSProjectFilesThreaded();
} catch (Exception ex) {
Log.Warning("Post processor '{0}' threw exception when calling OnGeneratedCSProjectFilesThreaded:\n{1}", pp, ex);
Log.Warning(Translations.Errors.WarningPostProcessorException, pp, ex);
}
}
}
@@ -297,7 +298,7 @@ namespace SingularityGroup.HotReload.Editor.ProjectGeneration {
try {
newContents = pp.OnGeneratedCSProjectThreaded(path, newContents);
} catch (Exception ex) {
Log.Warning("Post processor '{0}' failed when processing project '{1}':\n{2}", pp, path, ex);
Log.Warning(Translations.Errors.WarningPostProcessorFailedProject, pp, path, ex);
}
}
@@ -309,7 +310,7 @@ namespace SingularityGroup.HotReload.Editor.ProjectGeneration {
try {
newContents = pp.OnGeneratedSlnSolutionThreaded(path, newContents);
} catch (Exception ex) {
Log.Warning("Post processor '{0}' failed when processing solution '{1}':\n{2}", pp, path, ex);
Log.Warning(Translations.Errors.WarningPostProcessorFailedSolution, pp, path, ex);
}
}
@@ -425,8 +426,7 @@ namespace SingularityGroup.HotReload.Editor.ProjectGeneration {
return string.Format(GetProjectHeaderTemplate(), arguments);
} catch (Exception) {
throw new NotSupportedException(
"Failed creating c# project because the c# project header did not have the correct amount of arguments, which is " +
arguments.Length);
string.Format(Translations.Utility.FailedCreateCSharpProject, arguments.Length));
}
}
@@ -849,11 +849,11 @@ namespace SingularityGroup.HotReload.Editor.ProjectGeneration {
var instance = (IHotReloadProjectGenerationPostProcessor)Activator.CreateInstance(type);
postProcessors.Add(instance);
} catch (MissingMethodException) {
Log.Warning("The type '{0}' was expected to have a public default constructor but it didn't", type.FullName);
Log.Warning(Translations.Errors.WarningPostProcessorNoDefaultConstructor, type.FullName);
} catch (TargetInvocationException ex) {
Log.Warning("Exception occurred when invoking default constructor of '{0}':\n{1}", type.FullName, ex.InnerException);
Log.Warning(Translations.Errors.WarningPostProcessorConstructorException, type.FullName, ex.InnerException);
} catch (Exception ex) {
Log.Warning("Unknown exception encountered when trying to create post processor '{0}':\n{1}", type.FullName, ex);
Log.Warning(Translations.Errors.WarningPostProcessorUnknownException, type.FullName, ex);
}
}