mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-04-04 19:49:02 +08:00
Set defaults to ModularAvatarMergeAnimator to prevent potential errors
This commit is contained in:
parent
97af2308d6
commit
d087b05c8a
@ -4,6 +4,7 @@ using System.Linq;
|
||||
using nadena.dev.ndmf;
|
||||
using UnityEngine;
|
||||
using UnityEditor.Animations;
|
||||
using VRC.SDK3.Avatars.Components;
|
||||
using VRC.SDK3.Avatars.ScriptableObjects;
|
||||
|
||||
namespace nadena.dev.modular_avatar.core.editor
|
||||
@ -191,7 +192,10 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
if (_mamiByParam.Count > 0)
|
||||
{
|
||||
// This make sures the parameters are correctly merged into the FX layer.
|
||||
context.AvatarRootObject.AddComponent<ModularAvatarMergeAnimator>().animator = new AnimatorController
|
||||
var mergeAnimator = context.AvatarRootObject.AddComponent<ModularAvatarMergeAnimator>();
|
||||
mergeAnimator.layerType = VRCAvatarDescriptor.AnimLayerType.FX;
|
||||
mergeAnimator.deleteAttachedAnimator = false;
|
||||
mergeAnimator.animator = new AnimatorController
|
||||
{
|
||||
parameters = _mamiByParam.Keys.Select(name => new AnimatorControllerParameter
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user