mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-04-15 00:48:59 +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)
|
internal static void FixupExpressionsMenu(BuildContext context)
|
||||||
{
|
{
|
||||||
|
if (!context.AvatarDescriptor) return;
|
||||||
|
|
||||||
context.AvatarDescriptor.customExpressions = true;
|
context.AvatarDescriptor.customExpressions = true;
|
||||||
|
|
||||||
var expressionsMenu = context.AvatarDescriptor.expressionsMenu;
|
var expressionsMenu = context.AvatarDescriptor.expressionsMenu;
|
||||||
|
@ -65,6 +65,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
mergeSessions.Clear();
|
mergeSessions.Clear();
|
||||||
|
|
||||||
var descriptor = avatarGameObject.GetComponent<VRCAvatarDescriptor>();
|
var descriptor = avatarGameObject.GetComponent<VRCAvatarDescriptor>();
|
||||||
|
if (!descriptor) return;
|
||||||
|
|
||||||
if (descriptor.baseAnimationLayers != null) InitSessions(descriptor.baseAnimationLayers);
|
if (descriptor.baseAnimationLayers != null) InitSessions(descriptor.baseAnimationLayers);
|
||||||
if (descriptor.specialAnimationLayers != null) InitSessions(descriptor.specialAnimationLayers);
|
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)
|
protected override void Execute(ndmf.BuildContext context)
|
||||||
{
|
{
|
||||||
|
if (!context.AvatarDescriptor) return;
|
||||||
|
|
||||||
var expParams = context.AvatarDescriptor.expressionParameters;
|
var expParams = context.AvatarDescriptor.expressionParameters;
|
||||||
if (expParams != null && context.IsTemporaryAsset(expParams))
|
if (expParams != null && context.IsTemporaryAsset(expParams))
|
||||||
{
|
{
|
||||||
|
@ -183,6 +183,8 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
.ToImmutableDictionary();
|
.ToImmutableDictionary();
|
||||||
|
|
||||||
var avatar = avatarRoot.GetComponent<VRCAvatarDescriptor>();
|
var avatar = avatarRoot.GetComponent<VRCAvatarDescriptor>();
|
||||||
|
if (!avatar) return;
|
||||||
|
|
||||||
var expParams = avatar.expressionParameters;
|
var expParams = avatar.expressionParameters;
|
||||||
|
|
||||||
if (expParams == null)
|
if (expParams == null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user