missionpinball / mpf-gmc

Godot-based Media Controller for the MPF pinball framework
MIT License
5 stars 1 forks source link

on export slide lookups fail due to .tscn files being rename .tscn.remap #3

Closed mpcarr closed 1 month ago

mpcarr commented 1 month ago

When exporting and running the gmc, the lookups aren't populated as the tree traverse fails due to the the issues below:

(https://github.com/godotengine/godot/issues/66014) (https://github.com/godotengine/godot/issues/25672)

avanwinkle commented 1 month ago

Thanks for the tip! I've used export extensively on my previous personal project (Godot 3.5) but haven't tried it in GMC yet (Godot 4.2) and it's good to know that the export bundles use path remapping. I'll investigate and add official support for exporting projects!

avanwinkle commented 1 month ago

I've pushed an update that has a custom export hook to run the directory traversal and dump the mappings into a file. This file is included in the export package and will be detected and parsed during startup. Fortunately Godot tracks the original resource paths during the remap, so the files are still accessible at the saved paths even though they don't technically exist there.

This is also nice because one of my goals was to figure out how to avoid the directory traversal in "production" mode, for faster startup, and this settles that!