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

@ -169,11 +169,16 @@ namespace nadena.dev.modular_avatar.core.editor
}
Dictionary<string, ProvidedParameter> rootParameters = new();
foreach (var param in ParameterIntrospectionCache.GetParametersForObject(parentAvatar.gameObject)
.Where(p => p.Namespace == ParameterNamespace.Animator)
)
rootParameters[param.EffectiveName] = param;
{
if (!string.IsNullOrWhiteSpace(param.EffectiveName))
{
rootParameters[param.EffectiveName] = param;
}
}
var remaps = ParameterIntrospectionCache.GetParameterRemappingsAt(paramRef);
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)
{
return _component.parameters.Select(p =>
return _component.parameters
.Select(p =>
{
AnimatorControllerParameterType paramType;
bool animatorOnly = false;