mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-21 23:58:49 -05:00
Fix property field height for quaternions in variable editor as well
This commit is contained in:
parent
f296444c98
commit
5dc2eb4726
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user