mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-05-10 21:29:00 +08:00
fix incorrect log references
This commit is contained in:
parent
42f1fcfd59
commit
4f5feeb1b9
@ -293,7 +293,8 @@ namespace nadena.dev.modular_avatar.editor.ErrorReporting
|
|||||||
|
|
||||||
internal static void Log(ReportLevel level, string code, object[] strings, params Object[] objects)
|
internal static void Log(ReportLevel level, string code, object[] strings, params Object[] objects)
|
||||||
{
|
{
|
||||||
ErrorLog errorLog = new ErrorLog(level, code, strings, objects);
|
ErrorLog errorLog =
|
||||||
|
new ErrorLog(level, code, strings: strings.Select(s => s.ToString()).ToArray(), objects);
|
||||||
|
|
||||||
var avatarReport = CurrentReport._currentAvatar;
|
var avatarReport = CurrentReport._currentAvatar;
|
||||||
if (avatarReport == null)
|
if (avatarReport == null)
|
||||||
@ -307,7 +308,7 @@ namespace nadena.dev.modular_avatar.editor.ErrorReporting
|
|||||||
|
|
||||||
internal static void LogFatal(string code, object[] strings, params Object[] objects)
|
internal static void LogFatal(string code, object[] strings, params Object[] objects)
|
||||||
{
|
{
|
||||||
Log(ReportLevel.Error, code, strings, objects);
|
Log(ReportLevel.Error, code, strings: strings, objects: objects);
|
||||||
if (CurrentReport._currentAvatar != null)
|
if (CurrentReport._currentAvatar != null)
|
||||||
{
|
{
|
||||||
CurrentReport._currentAvatar.successful = false;
|
CurrentReport._currentAvatar.successful = false;
|
||||||
|
@ -358,8 +358,10 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
var defaultItems = items.Where(i => i.isDefault).ToList();
|
var defaultItems = items.Where(i => i.isDefault).ToList();
|
||||||
if (defaultItems.Count > 1)
|
if (defaultItems.Count > 1)
|
||||||
{
|
{
|
||||||
BuildReport.LogFatal("animation_gen.multiple_defaults", Array.Empty<object>(),
|
BuildReport.LogFatal("animation_gen.multiple_defaults",
|
||||||
defaultItems.ToArray<UnityEngine.Object>());
|
strings: Array.Empty<object>(),
|
||||||
|
objects: defaultItems.ToArray<UnityEngine.Object>()
|
||||||
|
);
|
||||||
defaultItems.RemoveRange(1, defaultItems.Count - 1);
|
defaultItems.RemoveRange(1, defaultItems.Count - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user