Skip to content

Commit 547c892

Browse files
committed
feat: added serialized property extensions for convenience
1 parent 3ab4bcd commit 547c892

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using UnityEditor;
2+
3+
namespace TNRD.Utilities
4+
{
5+
internal static class SerializedPropertyExtensions
6+
{
7+
public static SerializedProperty ReferenceModeProperty(this SerializedProperty property)
8+
{
9+
return property.FindPropertyRelative("mode");
10+
}
11+
12+
public static SerializedProperty RawReferenceProperty(this SerializedProperty property)
13+
{
14+
return property.FindPropertyRelative("rawReference");
15+
}
16+
17+
public static SerializedProperty UnityReferenceProperty(this SerializedProperty property)
18+
{
19+
return property.FindPropertyRelative("unityReference");
20+
}
21+
}
22+
}

Editor/Utilities/SerializedPropertyExtensions.cs.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)