mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-04-04 19:49:02 +08:00
fix type harmonization
This commit is contained in:
parent
4455119632
commit
dca6ad36ba
@ -100,9 +100,9 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
}
|
||||
|
||||
var stash = context.PluginBuildContext.GetState<RenamedMergeAnimators>();
|
||||
|
||||
|
||||
var clonedController = stash.Controllers.GetValueOrDefault(merge)
|
||||
?? _asc.ControllerContext.CloneContext.Clone(merge.animator);
|
||||
?? _asc.ControllerContext.CloneContext.CloneDistinct(merge.animator);
|
||||
|
||||
string basePath;
|
||||
if (merge.pathMode == MergeAnimatorPathMode.Relative)
|
||||
|
@ -79,6 +79,8 @@ namespace nadena.dev.modular_avatar.core.editor.plugin
|
||||
|
||||
seq.Run("Prune empty animator layers",
|
||||
ctx => { ctx.Extension<AnimatorServicesContext>().RemoveEmptyLayers(); });
|
||||
seq.Run("Harmonize animator parameter types",
|
||||
ctx => { ctx.Extension<AnimatorServicesContext>().HarmonizeParameterTypes(); });
|
||||
});
|
||||
|
||||
seq.WithRequiredExtension(typeof(AnimationServicesContext), _s2 =>
|
||||
|
@ -70,7 +70,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
|
||||
if (mama.animator == null) return null;
|
||||
|
||||
var cloned = AnimatorServices.ControllerContext.CloneContext.Clone(mama.animator, mama.layerType);
|
||||
var cloned = AnimatorServices.ControllerContext.CloneContext.CloneDistinct(mama.animator, mama.layerType);
|
||||
Controllers[mama] = cloned;
|
||||
|
||||
return cloned;
|
||||
|
@ -237,7 +237,10 @@ public class ConvertTransitionTypes : TestBase
|
||||
|
||||
var fx = (AnimatorController) FindFxController(prefab).animatorController;
|
||||
|
||||
Assert.AreEqual(fx.parameters[0].type, AnimatorControllerParameterType.Bool);
|
||||
Assert.AreEqual(
|
||||
AnimatorControllerParameterType.Bool,
|
||||
fx.parameters.First(p => p.name == "bool").type
|
||||
);
|
||||
}
|
||||
|
||||
void AssertTransitions(AnimatorControllerLayer layer, string src, string dest, int index,
|
||||
|
Loading…
x
Reference in New Issue
Block a user