@@ -12,5 +12,62 @@ public partial class FieldDefinition : ILDtkUid, ILDtkIdentifier
1212 [ IgnoreDataMember ] public TilesetDefinition Tileset => TilesetUid == null ? null : LDtkUidBank . GetUidData < TilesetDefinition > ( TilesetUid . Value ) ;
1313
1414 [ IgnoreDataMember ] public Color UnityEditorDisplayColor => EditorDisplayColor . ToColor ( ) ;
15+
16+ /// <value>
17+ /// Returns if this field (or array element) type is an Int.
18+ /// </value>
19+ [ IgnoreDataMember ] public bool IsInt => Type == "Int" || Type == "Array<Int>" ;
20+
21+ /// <value>
22+ /// Returns if this field (or array element) type is a Float.
23+ /// </value>
24+ [ IgnoreDataMember ] public bool IsFloat => Type == "Float" || Type == "Array<Float>" ;
25+
26+ /// <value>
27+ /// Returns if this field (or array element) type is a Bool.
28+ /// </value>
29+ [ IgnoreDataMember ] public bool IsBool => Type == "Bool" || Type == "Array<Bool>" ;
30+
31+ /// <value>
32+ /// Returns if this field (or array element) type is a String.
33+ /// </value>
34+ [ IgnoreDataMember ] public bool IsString => Type == "String" || Type == "Array<String>" ;
35+
36+ /// <value>
37+ /// Returns if this field (or array element) type is MultiLines.
38+ /// </value>
39+ [ IgnoreDataMember ] public bool IsMultilines => Type == "Multilines" || Type == "Array<Multilines>" ;
40+
41+ /// <value>
42+ /// Returns if this field (or array element) type is a FilePath.
43+ /// </value>
44+ [ IgnoreDataMember ] public bool IsFilePath => Type == "FilePath" || Type == "Array<FilePath>" ;
45+
46+ /// <value>
47+ /// Returns if this field (or array element) type is a Color.
48+ /// </value>
49+ [ IgnoreDataMember ] public bool IsColor => Type == "Color" || Type == "Array<Color>" ;
50+
51+ /// <value>
52+ /// Returns if this field (or array element) type is an Enum.
53+ /// </value>
54+ [ IgnoreDataMember ]
55+ public bool IsEnum => Type . Contains ( "LocalEnum." ) || Type . Contains ( "ExternEnum." ) ;
56+
57+ /// <value>
58+ /// Returns if this field (or array element) type is a Tile.
59+ /// </value>
60+ [ IgnoreDataMember ] public bool IsTile => Type == "Tile" || Type == "Array<Tile>" ;
61+
62+ /// <value>
63+ /// Returns if this field (or array element) type is a EntityRef.
64+ /// </value>
65+ [ IgnoreDataMember ] public bool IsEntityRef => Type == "EntityRef" || Type == "Array<EntityRef>" ;
66+
67+ /// <value>
68+ /// Returns if this field (or array element) type is a Point.
69+ /// </value>
70+ [ IgnoreDataMember ] public bool IsPoint => Type == "Point" || Type == "Array<Point>" ;
71+
1572 }
1673}
0 commit comments