Closed RavinMaddHatter closed 2 months ago
Okay... so it looks like when you compile .tscn files get renamed to .tscn.remap
static func load_asset(path : String) -> Resource:
if OS.has_feature("export"):
# Check if file is .remap
if not path.ends_with(".remap"):
return load(path)
# Open the file
var __config_file = ConfigFile.new()
__config_file.load(path)
# Load the remapped file
var __remapped_file_path = __config_file.get_value("remap", "path")
__config_file = null
return load(__remapped_file_path)
else:
return load(path)
i am going to spend some time trying to fix this...
no i have not yet tried to export, thank you for pointing this out as it is a high priority, let me know if you make any progress. i will try to make it work as well once im done with current refactoring
Looking through the code, this has to do with any time you "load("*.tscn") and that is done many many places. I was going to try to address it in the HumanizerGlobal area... but it may take substantial work to get export working right now.
Here are some solutions others have come up with Making a resource loader that is more static. https://github.com/derkork/godot-resource-groups Dont convert text to binary in the project settings https://github.com/godotengine/godot/issues/66014#issuecomment-2184131411 Dont use file path for dynamically finding the files https://github.com/godotengine/godot/issues/66014#issuecomment-2184406321
Here is the thread i found on the topic. https://github.com/godotengine/godot/issues/66014
Unchecking the "Covert Text Resources to Binary" setting in Project settings (check the advanced button)>editor>export makes export possible.
I think that this bug should stay open until the "default godot" settings for export work, but for now i would recomdend adding a statement about "how to export" to the readme and leave this issue open because there is a lot of complaints about this in the thread.
Have you considered a github wiki in place of just a readme file. They are not too bad to use or set up in the project.
thank you for the links, very much appreciated! i tried the setting as you said and it did work, not really sure what that means or why it would make a difference but thank you again. are there any drawbacks to doing it this way?
It isn't as efficient to run. And the file is bigger.. The fix would be to replace the load (string) with a new function that loads either the text file or the compiled file.
Or wait until they make a change to stop getting this as a bug report
ok, i was able to track down the issues using your initial leads, ended up changing the .tres files to .res and then i did a bit of a hack to register the .tscn files but the good news is the export works with default settings, i set the 'stress_test' scene as main scene, and am using debian linux. so let me know if the latest changes resolved the issue for you as well
Thank you! Will check when I get a chance
On Mon, Sep 23, 2024, 2:06 PM NitroxNova @.***> wrote:
ok, i was able to track down the issues using your initial leads, ended up changing the .tres files to .res and then i did a bit of a hack to register the .tscn files but the good news is the export works with default settings, i set the 'stress_test' scene as main scene, and am using debian linux. so let me know if the latest changes resolved the issue for you as well
— Reply to this email directly, view it on GitHub https://github.com/NitroxNova/humanizer/issues/31#issuecomment-2369386318, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBUC5CTNF3FYXEHUL4D55TZYB7EXAVCNFSM6AAAAABOGOCDVKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRZGM4DMMZRHA . You are receiving this because you authored the thread.Message ID: @.***>
alright i'll assume its working, thank you for helping me get that figured out and feel free to open another if its still having issues :)
I am working through exporting a binary based upon your example project. I dont know if you have successfully made an exe or other file. but i am struggling because the skelleton (along with many other resources) are not loading after exporting.
If you have had a successful export let me know what your settings are please. I have tried a few.