fix: empty MA Parameters names break auto param UI (#1346)

This commit is contained in:
bd_ 2024-11-16 19:02:37 -08:00 committed by GitHub
parent 30512c26e8
commit d23b9f94a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View File

@ -173,7 +173,12 @@ namespace nadena.dev.modular_avatar.core.editor
foreach (var param in ParameterIntrospectionCache.GetParametersForObject(parentAvatar.gameObject) foreach (var param in ParameterIntrospectionCache.GetParametersForObject(parentAvatar.gameObject)
.Where(p => p.Namespace == ParameterNamespace.Animator) .Where(p => p.Namespace == ParameterNamespace.Animator)
) )
{
if (!string.IsNullOrWhiteSpace(param.EffectiveName))
{
rootParameters[param.EffectiveName] = param; rootParameters[param.EffectiveName] = param;
}
}
var remaps = ParameterIntrospectionCache.GetParameterRemappingsAt(paramRef); var remaps = ParameterIntrospectionCache.GetParameterRemappingsAt(paramRef);
foreach (var remap in remaps) foreach (var remap in remaps)

View File

@ -59,7 +59,8 @@ namespace nadena.dev.modular_avatar.core.editor
public IEnumerable<ProvidedParameter> GetSuppliedParameters(ndmf.BuildContext context = null) public IEnumerable<ProvidedParameter> GetSuppliedParameters(ndmf.BuildContext context = null)
{ {
return _component.parameters.Select(p => return _component.parameters
.Select(p =>
{ {
AnimatorControllerParameterType paramType; AnimatorControllerParameterType paramType;
bool animatorOnly = false; bool animatorOnly = false;