mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-04-24 05:19:00 +08:00
hack: null check AvatarDescriptors before ndmf is aware of environments
This commit is contained in:
parent
480563d8ce
commit
c52dbbe3cb
@ -128,6 +128,8 @@ namespace nadena.dev.modular_avatar.animation
|
|||||||
#if MA_VRCSDK3_AVATARS
|
#if MA_VRCSDK3_AVATARS
|
||||||
var avatarDescriptor = context.AvatarDescriptor;
|
var avatarDescriptor = context.AvatarDescriptor;
|
||||||
|
|
||||||
|
if (!avatarDescriptor) return;
|
||||||
|
|
||||||
foreach (var layer in avatarDescriptor.baseAnimationLayers)
|
foreach (var layer in avatarDescriptor.baseAnimationLayers)
|
||||||
{
|
{
|
||||||
BootstrapLayer(layer);
|
BootstrapLayer(layer);
|
||||||
|
@ -51,9 +51,12 @@ namespace nadena.dev.modular_avatar.animation
|
|||||||
// This helps reduce the risk that we'll accidentally modify the original assets.
|
// This helps reduce the risk that we'll accidentally modify the original assets.
|
||||||
|
|
||||||
#if MA_VRCSDK3_AVATARS
|
#if MA_VRCSDK3_AVATARS
|
||||||
context.AvatarDescriptor.baseAnimationLayers =
|
var avatarDescriptor = context.AvatarDescriptor;
|
||||||
|
if (!avatarDescriptor) return;
|
||||||
|
|
||||||
|
avatarDescriptor.baseAnimationLayers =
|
||||||
CloneLayers(context, context.AvatarDescriptor.baseAnimationLayers);
|
CloneLayers(context, context.AvatarDescriptor.baseAnimationLayers);
|
||||||
context.AvatarDescriptor.specialAnimationLayers =
|
avatarDescriptor.specialAnimationLayers =
|
||||||
CloneLayers(context, context.AvatarDescriptor.specialAnimationLayers);
|
CloneLayers(context, context.AvatarDescriptor.specialAnimationLayers);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user