Skip to content

Commit

Permalink
Merge pull request #90 from moz-moz/fix/rect-offset-drawing
Browse files Browse the repository at this point in the history
Fix display of RectOffset in inspector
  • Loading branch information
AnnulusGames authored Jun 20, 2024
2 parents e395eec + dff264d commit e12798c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ public AlchemyPropertyField(SerializedProperty property, Type type, bool isArray

switch (property.propertyType)
{
// NOTE: RectOffset is a generic property type, but it doesn't have a SerializeField. Instead, use PropertyField.
case SerializedPropertyType.Generic when property.type == "RectOffset":
default:
element = new PropertyField(property);
break;
Expand Down
5 changes: 5 additions & 0 deletions Alchemy/Assets/Alchemy/Samples~/Samples/Samples.unity
Original file line number Diff line number Diff line change
Expand Up @@ -2055,6 +2055,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 10a01c03cb52744d29a15035954b9bd2, type: 3}
m_Name:
m_EditorClassIdentifier:
qux:
m_Left: 1
m_Right: 2
m_Top: 3
m_Bottom: 4
foo: 0
bar: {x: 0, y: 0, z: 0}
baz: {fileID: 0}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace Alchemy.Samples
{
public class OrderSample : MonoBehaviour
{
[Order(3)] public RectOffset qux;
[Order(2)] public float foo;
[Order(1)] public Vector3 bar;
[Order(0)] public GameObject baz;
Expand Down

0 comments on commit e12798c

Please sign in to comment.