mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-04-24 21:38:59 +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
|
||||
var avatarDescriptor = context.AvatarDescriptor;
|
||||
|
||||
if (!avatarDescriptor) return;
|
||||
|
||||
foreach (var layer in avatarDescriptor.baseAnimationLayers)
|
||||
{
|
||||
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.
|
||||
|
||||
#if MA_VRCSDK3_AVATARS
|
||||
context.AvatarDescriptor.baseAnimationLayers =
|
||||
var avatarDescriptor = context.AvatarDescriptor;
|
||||
if (!avatarDescriptor) return;
|
||||
|
||||
avatarDescriptor.baseAnimationLayers =
|
||||
CloneLayers(context, context.AvatarDescriptor.baseAnimationLayers);
|
||||
context.AvatarDescriptor.specialAnimationLayers =
|
||||
avatarDescriptor.specialAnimationLayers =
|
||||
CloneLayers(context, context.AvatarDescriptor.specialAnimationLayers);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user