fix: animator initial value type conversion (#1163)

This commit is contained in:
nekobako 2024-09-18 11:47:56 +09:00 committed by GitHub
parent 3648348184
commit 56f1b67d31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -40,7 +40,7 @@ namespace nadena.dev.modular_avatar.core.editor
switch (parameters[i].type)
{
case AnimatorControllerParameterType.Bool:
parameters[i].defaultBool = defaultValue > 0.5f;
parameters[i].defaultBool = defaultValue != 0.0f;
break;
case AnimatorControllerParameterType.Int:
parameters[i].defaultInt = Mathf.RoundToInt(defaultValue);