You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
506 B
18 lines
506 B
using UnityEditor; |
|
|
|
namespace Unity.Mathematics.Editor |
|
{ |
|
[CustomPropertyDrawer(typeof(quaternion))] |
|
class QuaternionDrawer : PostNormalizedVectorDrawer |
|
{ |
|
protected override SerializedProperty GetVectorProperty(SerializedProperty property) |
|
{ |
|
return property.FindPropertyRelative("value"); |
|
} |
|
|
|
protected override double4 Normalize(double4 value) |
|
{ |
|
return math.normalizesafe(new quaternion((float4)value)).value; |
|
} |
|
} |
|
}
|
|
|