# Import map during runtime? (Godot)

**URL:** <https://discourse.mapeditor.org/t/import-map-during-runtime-godot/4404>\
**Category:** Questions\
**Created:** [March 17, 2020, 10:22pm UTC](https://discourse.mapeditor.org/t/import-map-during-runtime-godot/4404 "2020-03-17T22:22:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![FireSide\_01](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/fireside_01/32/2672_2.png) [@FireSide\_01](https://discourse.mapeditor.org/u/FireSide_01)\
**Post date:** [March 17, 2020, 10:22pm UTC](https://discourse.mapeditor.org/t/import-map-during-runtime-godot/4404/1 "2020-03-17T22:22:50Z")

</div>

Is there a way to import a map via script during runtime with the Godot importer?

---

<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 18, 2020, 7:30am UTC](https://discourse.mapeditor.org/t/import-map-during-runtime-godot/4404/2 "2020-03-18T07:30:56Z")

</div>

I’m not sure what exactly you’re trying to achieve, but if you’re using [this Godot importer](https://github.com/vnen/godot-tiled-importer) you may be interested to try this new Tiled exporter by @Mihail_Ilinov instead:

> [@Tiled Editor map and tileset integration with Godot 3.2](https://discourse.mapeditor.org/t/tiled-editor-map-and-tileset-integration-with-godot-3-2/4347/15):
>
> One month later I’m ready and releasing the extensions for Tiled. It can be download them from GitHub: Also, I’ve made a short video tutorial: The versions I used in the video are Godot 3.2.1, Tiled 1.3.3 Cheers.

With this Tiled extension, once you export your map it will be immediately available in Godot without needing an additional importer.

Note that it is uses some new script API so you’ll need to download the latest _snapshot_ version instead of Tiled 1.3.3 to use this extension.

---

<div class="post-metadata">

**Author:** ![Mihail\_Ilinov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/mihail_ilinov/32/2643_2.png) [@Mihail\_Ilinov](https://discourse.mapeditor.org/u/Mihail_Ilinov)\
**Post date:** [March 18, 2020, 7:47am UTC](https://discourse.mapeditor.org/t/import-map-during-runtime-godot/4404/3 "2020-03-18T07:47:40Z")

</div>

Just to add that a Tiledmap exported from Tiled is a Scene with a Tilemap node in Godot.  
So if you want to load it in your game runtime, you should just make an instance via:

```
# Load a tilemap
var exported_map_resource = load("res://path/to/exported_map.tscn)
var exported_map= exported_map_resource.instance()
root.add_child(exported_map)
```

---

<div class="post-metadata">

**Author:** ![FireSide\_01](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/fireside_01/32/2672_2.png) [@FireSide\_01](https://discourse.mapeditor.org/u/FireSide_01)\
**Post date:** [March 18, 2020, 4:34pm UTC](https://discourse.mapeditor.org/t/import-map-during-runtime-godot/4404/4 "2020-03-18T16:34:33Z")

</div>

Thank you!
