From 8da1c9d3bedf20bbe8d745da80ecdcfeb83ff5dd Mon Sep 17 00:00:00 2001 From: bd_ Date: Mon, 28 Aug 2023 21:25:17 +0900 Subject: [PATCH] fix: issues preventing error log from being displayed in some cases (#409) --- .../Editor/ErrorReporting/ErrorReportUI.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Packages/nadena.dev.modular-avatar/Editor/ErrorReporting/ErrorReportUI.cs b/Packages/nadena.dev.modular-avatar/Editor/ErrorReporting/ErrorReportUI.cs index f5150776..b3e9bbaa 100644 --- a/Packages/nadena.dev.modular-avatar/Editor/ErrorReporting/ErrorReportUI.cs +++ b/Packages/nadena.dev.modular-avatar/Editor/ErrorReporting/ErrorReportUI.cs @@ -112,13 +112,8 @@ namespace nadena.dev.modular_avatar.editor.ErrorReporting { activeAvatarObject = RuntimeUtil.FindAvatarInParents(Selection.activeGameObject.transform)?.gameObject; activeAvatar = BuildReport.CurrentReport.Avatars.FirstOrDefault(av => - av.objectRef.path == RuntimeUtil.RelativePath(null, activeAvatarObject)); - - if (activeAvatar == null) - { - activeAvatar = new AvatarReport(); - activeAvatar.objectRef = new ObjectRef(activeAvatarObject); - } + av.objectRef.path == RuntimeUtil.RelativePath(null, activeAvatarObject) + || av.objectRef.path == RuntimeUtil.RelativePath(null, activeAvatarObject) + "(Clone)"); } if (activeAvatar == null) @@ -126,6 +121,12 @@ namespace nadena.dev.modular_avatar.editor.ErrorReporting activeAvatar = BuildReport.CurrentReport.Avatars.LastOrDefault(); } + if (activeAvatar == null) + { + activeAvatar = new AvatarReport(); + activeAvatar.objectRef = new ObjectRef(activeAvatarObject); + } + if (activeAvatar != null) { reported++;