Skip to content

Commit e12798c

Browse files
authored
Merge pull request #90 from moz-moz/fix/rect-offset-drawing
Fix display of RectOffset in inspector
2 parents e395eec + dff264d commit e12798c

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

Alchemy/Assets/Alchemy/Editor/Elements/AlchemyPropertyField.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ public AlchemyPropertyField(SerializedProperty property, Type type, bool isArray
1717

1818
switch (property.propertyType)
1919
{
20+
// NOTE: RectOffset is a generic property type, but it doesn't have a SerializeField. Instead, use PropertyField.
21+
case SerializedPropertyType.Generic when property.type == "RectOffset":
2022
default:
2123
element = new PropertyField(property);
2224
break;

Alchemy/Assets/Alchemy/Samples~/Samples/Samples.unity

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2055,6 +2055,11 @@ MonoBehaviour:
20552055
m_Script: {fileID: 11500000, guid: 10a01c03cb52744d29a15035954b9bd2, type: 3}
20562056
m_Name:
20572057
m_EditorClassIdentifier:
2058+
qux:
2059+
m_Left: 1
2060+
m_Right: 2
2061+
m_Top: 3
2062+
m_Bottom: 4
20582063
foo: 0
20592064
bar: {x: 0, y: 0, z: 0}
20602065
baz: {fileID: 0}

Alchemy/Assets/Alchemy/Samples~/Samples/Scripts/General/OrderSample.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ namespace Alchemy.Samples
55
{
66
public class OrderSample : MonoBehaviour
77
{
8+
[Order(3)] public RectOffset qux;
89
[Order(2)] public float foo;
910
[Order(1)] public Vector3 bar;
1011
[Order(0)] public GameObject baz;

0 commit comments

Comments
 (0)