Skip to content

tileset.asset.fileName returns null in export_to_godot_tilemap.mjs #52

@calebtnorth

Description

@calebtnorth

I was having difficulty utilizing the relativePath property exporting a TileMap when, upon testing, realized it would properly set the ext_resource in the final .tscn if I specified the exact path to the tileset (e.g. /Assets/Maps/Town/town_map.tres).|

This did not happen with Tilesets, as the exported .tres properly linked to their source image without projectRoot or relativePath needing to be specified.

I dug around the source code only to find that tileset.asset.fileName in setTilesetsString() returned null when tileset.asset returned a proper object reference, resulting in relativePath only working if it included the tileset file name as well.

image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions