hack: more null check AvatarDescriptors

This commit is contained in:
kaikoga 2023-12-30 12:08:51 +09:00
parent c52dbbe3cb
commit ce098d64c8
4 changed files with 7 additions and 0 deletions

View File

@ -19,6 +19,8 @@ namespace nadena.dev.modular_avatar.core.editor
internal static void FixupExpressionsMenu(BuildContext context)
{
if (!context.AvatarDescriptor) return;
context.AvatarDescriptor.customExpressions = true;
var expressionsMenu = context.AvatarDescriptor.expressionsMenu;

View File

@ -65,6 +65,7 @@ namespace nadena.dev.modular_avatar.core.editor
mergeSessions.Clear();
var descriptor = avatarGameObject.GetComponent<VRCAvatarDescriptor>();
if (!descriptor) return;
if (descriptor.baseAnimationLayers != null) InitSessions(descriptor.baseAnimationLayers);
if (descriptor.specialAnimationLayers != null) InitSessions(descriptor.specialAnimationLayers);

View File

@ -9,6 +9,8 @@ namespace nadena.dev.modular_avatar.core.editor
{
protected override void Execute(ndmf.BuildContext context)
{
if (!context.AvatarDescriptor) return;
var expParams = context.AvatarDescriptor.expressionParameters;
if (expParams != null && context.IsTemporaryAsset(expParams))
{

View File

@ -183,6 +183,8 @@ namespace nadena.dev.modular_avatar.core.editor
.ToImmutableDictionary();
var avatar = avatarRoot.GetComponent<VRCAvatarDescriptor>();
if (!avatar) return;
var expParams = avatar.expressionParameters;
if (expParams == null)