Hi all! I am working on trying to export my game, and everything seems to be working fine except for custom resources. They do not load at all! I did some digging and it looks like when the game is exported out, resources are not treated like other files and are loaded in a different way. I am getting conflicting messages on exactly how/where this is done, and trying all the different suggestions always leads to it not working. So I am really not sure what to do here (And no idea why this isn't a more prominent piece of info)

Simple example, I want to create a Dictionary for all my items when the game loads. Super simple, here is the code before accounting for exporting:

func load_all_items():
var dir = DirAccess.open("res://Resources/Items")
if dir:
dir.list_dir_begin()
var file_name = dir.get_next()
while file_name != "":
file_name = file_name.replace(".tres","")
all_items[str(file_name)] = load("res://Resources/Items/" + file_name + ".tres")
file_name = dir.get_next()

Simple code and it works like a charm! No notes.
From what I am reading, it sounds like the files essentially get a ".remap" on the end of the file path after export. So I tried adding ".remap" to the code above in various combinations to get it to work, and nothing. Still can't locate any of the items.

I also found some info that the path itself is different when dealing with custom resources. so the "res/Resources/Items/" would no longer be the correct path, it would actually be something like "res://.godot/imported" But even when I try updating the above code to account for this, I still get nothing!

I've even tried combining these two suggested fixes in different combinations, and nothing. It would probably be easier if there was a way to see debug commands like print(), but oh well. Does anyone have any information on how this works? How do I get my custom resources to actually function with an exported game?

    CorvaNocta if there was a way to see debug commands like print()

    You can do that with Godot's Remote Debug feature.

    Or if you're exporting to an Android phone, you can use adb to see the output of print().

    Or the old fashioned but straightforward method is to display debug info in an onscreen Label or RichTextLabel.

      DaveTheCoder I've been printing to an on screen text label 😁 but it's very quickly coded, so only gives me the most recent code haha. I should expand it for proper debugging.

      I did some searching for the remote debugging, but couldn't find anything on how to actually use it. I think I'm just searching wrong? Can you point me in the right direction?

      https://docs.godotengine.org/en/4.3/tutorials/scripting/debug/overview_of_debugging_tools.html#deploy-with-remote-debug

      One-click deploy means to export using the Remote Debug icon on the right side of the menu bar.

      The Deploy with Remote Debug option is in the Debug menu. Set that option before doing the one-click deploy.

      I don't know when that feature was added, but I only noticed it recently. It saves a lot of time. You can see output in the editor console, set breakpoints, inspect variables, etc.