mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2024-12-29 18:55:06 +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;
|
||||
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++;
|
||||
|
Loading…
Reference in New Issue
Block a user