# Custom property type

**URL:** <https://discourse.mapeditor.org/t/custom-property-type/5000>\
**Category:** Uncategorized\
**Created:** [March 4, 2021, 9:16am UTC](https://discourse.mapeditor.org/t/custom-property-type/5000 "2021-03-04T09:16:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ori\_adereth](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/ori_adereth/32/3214_2.png) [@ori\_adereth](https://discourse.mapeditor.org/u/ori_adereth)\
**Post date:** [March 4, 2021, 9:16am UTC](https://discourse.mapeditor.org/t/custom-property-type/5000/1 "2021-03-04T09:16:39Z")

</div>

Hi there,  
I am writing a game engine using C++ & SDL2. I am currently working on generating game objects from a Tiled map, I am quite new to Tiled so I don’t know if the feature I am lookng for exists. The general idea is that in Tiled I will specify the components that an object has and my game engine could read the map file and generate the object I want. I was wondering if there is a way to create custom property types, so I could attach a component to an object by a single property (much like it is done in Unity).  
For example, let’s say I want to attach a Transform component to an object, I could just add a new property of type Transform, then I could just fiil in each parameter that a Transform component needs.  
I hope I was clear in my explanation, thanks to every one who could help me!

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [March 4, 2021, 9:33am UTC](https://discourse.mapeditor.org/t/custom-property-type/5000/2 "2021-03-04T09:33:51Z")

</div>

This is not possible yet, but it’s one of the things planned for Tiled 1.6 (I’m currently finalizing 1.5):

> <https://github.com/mapeditor/tiled/issues/489>
>
> Currently it is not possible to create your own nested properties (like Position, Size). If a single property needs to encode...

---

<div class="post-metadata">

**Author:** ![eishiya](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/eishiya/32/2534_2.png) [@eishiya](https://discourse.mapeditor.org/u/eishiya)\
**Post date:** [March 4, 2021, 1:49pm UTC](https://discourse.mapeditor.org/t/custom-property-type/5000/3 "2021-03-04T13:49:04Z")

</div>

For now, the way to do this is with strings, since you can include multiple values in CSV or JSON or any other notation you like. Using the Object Type editor, you can even pre-fill these values with defaults to make putting this data in easier.

---

<div class="post-metadata">

**Author:** ![ori\_adereth](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/ori_adereth/32/3214_2.png) [@ori\_adereth](https://discourse.mapeditor.org/u/ori_adereth)\
**Post date:** [March 4, 2021, 2:06pm UTC](https://discourse.mapeditor.org/t/custom-property-type/5000/4 "2021-03-04T14:06:37Z")

</div>

That sounds great, I can’t wait for this new feature.  
I will use strings for now.  
Thanks for your fast response!
