mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-04-13 16:09:02 +08:00
hack: more null check AvatarDescriptors
This commit is contained in:
parent
c52dbbe3cb
commit
ce098d64c8
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user