Fix property field height for quaternions in variable editor as well

This commit is contained in:
Adam Ramberg 2023-12-19 00:27:28 +01:00
parent f296444c98
commit 5dc2eb4726

View File

@ -25,7 +25,18 @@ namespace UnityAtoms.Editor
}
else
{
EditorGUILayout.PropertyField(property, true);
// Quaternion property height is not handled correctly by Unity in versions
// 2021.2 and above. Taking that into account here.
#if UNITY_2021_2_OR_NEWER
if (property.propertyType == SerializedPropertyType.Quaternion)
{
EditorGUILayout.PropertyField(property, false);
}
else
#endif
{
EditorGUILayout.PropertyField(property, true);
}
}
}