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

When I try and export the project with Wwise included it says it cannot find necessary files #26

Closed
smks opened this issue Apr 5, 2021 · 16 comments

Comments

@smks
Copy link

smks commented Apr 5, 2021

ERROR: Cannot load source code from file 'res://wwise/GeneratedSoundBanks/wwise_ids.gd'.
At: modules/gdscript/gdscript.cpp:2239
ERROR: Failed loading resource: res://wwise/GeneratedSoundBanks/wwise_ids.gd. Make sure resources have been imported by opening the project in the editor at least once.
At: core/io/resource_loader.cpp:278

image

@alessandrofama
Copy link
Owner

alessandrofama commented Apr 5, 2021

I can't reproduce this on macOS and Windows, so there must be something about your project that is different than mine. Could you please answer these questions so I can debug this further: What are the exact steps to reproduce the error? Where does the error happen exactly? While exporting or after trying to run the exported project? It isn't clear from your screenshot. Does the project work when played through the editor? Does the error only occur on Windows? Which Godot version are you using?

@smks
Copy link
Author

smks commented May 22, 2021

Hey me again! I exported it with Mac and included all the Wwise files now, where can I configure this thing it is raising in the logs?
ERROR: open_dynamic_library: Can't open dynamic library: /Volumes/TribeOfAccord/TribeOfAccord.app/Contents/MacOS/../Frameworks/libWwiseGDNative.dylib, error: dlopen(/Volumes/TribeOfAccord/TribeOfAccord.app/Contents/MacOS/../Frameworks/libWwiseGDNative.dylib, 2): no suitable image found. Did find:
/Volumes/TribeOfAccord/TribeOfAccord.app/Contents/MacOS/../Frameworks/libWwiseGDNative.dylib: code signature in (/Volumes/TribeOfAccord/TribeOfAccord.app/Contents/MacOS/../Frameworks/libWwiseGDNative.dylib) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?).

@smks
Copy link
Author

smks commented May 22, 2021

Ok I got around that by disabling Library signature in the options of Godot export. Getting closer.

Wwise systems initialisation succeeded
ERROR: _init: AK_Fail Copying banks to user:// failed!
   At: src/wwise_gdnative.cpp:233.
ERROR: loadBankID: AK_Fail ID 1355168291
   At: src/wwise_gdnative.cpp:324.
ERROR: loadBankID: AK_Fail ID 3161908922
   At: src/wwise_gdnative.cpp:324.

@alessandrofama
Copy link
Owner

alessandrofama commented May 22, 2021

Have you added your banks to the non resource export filters as detailed here? https://github.com/alessandrofama/wwise-godot-integration/wiki/Exporting-the-project#windows-macos-linux-and-android
Usually it should fail if the banks are not present in the exported project. Godot will not include the banks in the exported project if they are not added to the export filters.

@smks
Copy link
Author

smks commented May 22, 2021

That was the one, thank you so much!
My Soundbank is around 1GB, seems to be really struggling to boot up when that is bundled in. Quite a new macbook too.
Screenshot 2021-05-22 at 16 15 51

@alessandrofama
Copy link
Owner

If you are using version 1.0 one problem might be that banks get copied to the user:// directory at each start of the game. We didn't have a custom I/O solution back then and it was the easiest solution for loading banks across different platforms, apologies for that.
You could try to download and replace the Mac libs of 1.1 (backup the old ones): https://github.com/alessandrofama/wwise-godot-integration/releases/download/1.1.0_Wwise2019.2.1.7250/macOS.zip
These include a fix where the copying happens only at first start. We haven't released the updated version with the custom I/O solution that doesn't require copying yet, but I can provide the binaries if it can solve the problem.

@alessandrofama
Copy link
Owner

alessandrofama commented May 22, 2021

macOS 1.2.0.zip
These are the one's with the custom I/O solution. Would be interesting to know if these solve the problem!

@smksnutmeg
Copy link

Great I'll give this a shot. Out of curiosity how does the custom IO solution work/get around this copy over of the banks?

@smks
Copy link
Author

smks commented May 22, 2021

Added it, and it works so well now. Loaded up much faster. Thanks!!

@alessandrofama
Copy link
Owner

alessandrofama commented May 22, 2021

It uses Godot's File class to directly open, read the banks and get the data when Wwise requests it: https://github.com/alessandrofama/wwise-godot-integration/blob/main/wwise-gdnative/src/wwise_godot_io.cpp

Major problem was that Wwise's default I/O implementation uses the C standard input/output lib for I/O, which works fine when you are working in the editor as you can clearly locate the banks on your disk, but for exported projects Godot uses a virtual file system so it was a headache to correctly locate the banks for different platforms. The naïve solution was to copy the banks to the user directory, which resolves to the same path for all platforms and load them from there. This introduced some problems as yours above, but the custom I/O implementation should fix that, as Godot takes care of reading the files.

@alessandrofama
Copy link
Owner

Let me know if you need the updated libs for other platforms, so I can export them.

@smksnutmeg
Copy link

Sure! windows and does this plugin work with HTML/Web Assembly?

@smksnutmeg
Copy link

Linux too

@alessandrofama
Copy link
Owner

alessandrofama commented May 23, 2021

Wwise doesn't support HTML/Web Assembly (yet?). I'll link the Windows and Linux files once the CI does its job.

@alessandrofama
Copy link
Owner

Linux
Windows

@alessandrofama
Copy link
Owner

Closing as this issue was solved.

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

3 participants