Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporting has issues #31

Closed
RavinMaddHatter opened this issue Sep 14, 2024 · 8 comments
Closed

Exporting has issues #31

RavinMaddHatter opened this issue Sep 14, 2024 · 8 comments

Comments

@RavinMaddHatter
Copy link
Collaborator

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.

@RavinMaddHatter
Copy link
Collaborator Author

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... 

@NitroxNova
Copy link
Owner

NitroxNova commented Sep 14, 2024

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

@RavinMaddHatter
Copy link
Collaborator Author

RavinMaddHatter commented Sep 14, 2024

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
godotengine/godot#66014 (comment)
Dont use file path for dynamically finding the files
godotengine/godot#66014 (comment)

Here is the thread i found on the topic.
godotengine/godot#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.

@NitroxNova
Copy link
Owner

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?

@RavinMaddHatter
Copy link
Collaborator Author

RavinMaddHatter commented Sep 21, 2024 via email

@NitroxNova
Copy link
Owner

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

@RavinMaddHatter
Copy link
Collaborator Author

RavinMaddHatter commented Sep 23, 2024 via email

@NitroxNova
Copy link
Owner

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants