Is there scripting access to the properties created in the custom types editor
?
I see that the list is named propertyTypes
in the project files, but there is no reference in the API documentation. Thanks.
No. While you can get the properties that have been set in assets, including those using custom types, the definitions and default values are not yet accessible. Relevant issue: Scripting: the API for getting PropertyTypes · Issue #3419 · mapeditor/tiled · GitHub
You can, however, parse the Project file yourself if you don’t want to wait for proper access to be implemented. You can read the project file into a string with TextFile, and pass that string to JSON.parse().
1 Like
That is an excellent solution. Thank you.