# Assigning scripts automatically in tiled before unity

**URL:** <https://discourse.mapeditor.org/t/assigning-scripts-automatically-in-tiled-before-unity/6164>\
**Category:** Questions\
**Created:** [May 7, 2023, 10:29pm UTC](https://discourse.mapeditor.org/t/assigning-scripts-automatically-in-tiled-before-unity/6164 "2023-05-07T22:29:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlbertusuGD](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/albertusugd/32/4104_2.png) [@AlbertusuGD](https://discourse.mapeditor.org/u/AlbertusuGD)\
**Post date:** [May 7, 2023, 10:29pm UTC](https://discourse.mapeditor.org/t/assigning-scripts-automatically-in-tiled-before-unity/6164/1 "2023-05-07T22:29:32Z")

</div>

Can i add a script automatically to a layer in tiled that exists in unity?

---

<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:** [May 7, 2023, 10:40pm UTC](https://discourse.mapeditor.org/t/assigning-scripts-automatically-in-tiled-before-unity/6164/2 "2023-05-07T22:40:13Z")

</div>

Tiled doesn’t know anything about Unity scripts. You can add a custom string property to your layer, and then you _might_ be able to assign the value of that property as a script as part of the import process, using a [custom importer](https://supertiled2unity.readthedocs.io/en/latest/manual/extending-the-importer.html#custom-importers).

I can’t tell you how to use the contents of a string as a script in Unity though, that’s a question for the Unity community xP
