mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-01 20:25:07 +08:00
fix: NullRefExceptions from inspectors (#789)
* fix: NullReferenceError while deleting a GameObject with parameter usage UI open * fix: NullRefException from editor when moving a Menu Installer outside of an avatar
This commit is contained in:
parent
a630cfc316
commit
f92d10cf50
@ -178,7 +178,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (InstallTargets.Count == 1 && (InstallTargets[0] is VRCExpressionsMenu || InstallTargets[0] == null))
|
if (commonAvatar != null && InstallTargets.Count == 1 && (InstallTargets[0] is VRCExpressionsMenu || InstallTargets[0] == null))
|
||||||
{
|
{
|
||||||
var displayValue = installTo.objectReferenceValue;
|
var displayValue = installTo.objectReferenceValue;
|
||||||
if (displayValue == null) displayValue = commonAvatar.expressionsMenu;
|
if (displayValue == null) displayValue = commonAvatar.expressionsMenu;
|
||||||
|
@ -104,8 +104,10 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
|
|
||||||
var ctx = serializedObject.context as GameObject;
|
var ctx = serializedObject.context as GameObject;
|
||||||
|
|
||||||
|
if (ctx == null) return;
|
||||||
|
|
||||||
var avatarRoot = RuntimeUtil.FindAvatarTransformInParents(ctx.transform)?.gameObject;
|
var avatarRoot = RuntimeUtil.FindAvatarTransformInParents(ctx.transform)?.gameObject;
|
||||||
if (ctx == null || avatarRoot == null) return;
|
if (avatarRoot == null) return;
|
||||||
|
|
||||||
var orderedPlugins = ParameterInfo.ForUI.GetParametersForObject(ctx)
|
var orderedPlugins = ParameterInfo.ForUI.GetParametersForObject(ctx)
|
||||||
.GroupBy(p => p.Plugin)
|
.GroupBy(p => p.Plugin)
|
||||||
|
Loading…
Reference in New Issue
Block a user