Assigning scripts automatically in tiled before unity

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

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.

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