mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-01 20:25:07 +08:00
fix: issues preventing error log from being displayed in some cases (#409)
This commit is contained in:
parent
61de99e01f
commit
8da1c9d3be
@ -112,13 +112,8 @@ namespace nadena.dev.modular_avatar.editor.ErrorReporting
|
|||||||
{
|
{
|
||||||
activeAvatarObject = RuntimeUtil.FindAvatarInParents(Selection.activeGameObject.transform)?.gameObject;
|
activeAvatarObject = RuntimeUtil.FindAvatarInParents(Selection.activeGameObject.transform)?.gameObject;
|
||||||
activeAvatar = BuildReport.CurrentReport.Avatars.FirstOrDefault(av =>
|
activeAvatar = BuildReport.CurrentReport.Avatars.FirstOrDefault(av =>
|
||||||
av.objectRef.path == RuntimeUtil.RelativePath(null, activeAvatarObject));
|
av.objectRef.path == RuntimeUtil.RelativePath(null, activeAvatarObject)
|
||||||
|
|| av.objectRef.path == RuntimeUtil.RelativePath(null, activeAvatarObject) + "(Clone)");
|
||||||
if (activeAvatar == null)
|
|
||||||
{
|
|
||||||
activeAvatar = new AvatarReport();
|
|
||||||
activeAvatar.objectRef = new ObjectRef(activeAvatarObject);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (activeAvatar == null)
|
if (activeAvatar == null)
|
||||||
@ -126,6 +121,12 @@ namespace nadena.dev.modular_avatar.editor.ErrorReporting
|
|||||||
activeAvatar = BuildReport.CurrentReport.Avatars.LastOrDefault();
|
activeAvatar = BuildReport.CurrentReport.Avatars.LastOrDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (activeAvatar == null)
|
||||||
|
{
|
||||||
|
activeAvatar = new AvatarReport();
|
||||||
|
activeAvatar.objectRef = new ObjectRef(activeAvatarObject);
|
||||||
|
}
|
||||||
|
|
||||||
if (activeAvatar != null)
|
if (activeAvatar != null)
|
||||||
{
|
{
|
||||||
reported++;
|
reported++;
|
||||||
|
Loading…
Reference in New Issue
Block a user