alessandrofama / wwise-godot-integration

Wwise Integration for the Godot Engine
Other
288 stars 14 forks source link

override.cfg resets other user activated addons #13

Closed alessandrofama closed 3 years ago

alessandrofama commented 3 years ago

Currently we are copying an override.cfg file when installing the integration to automatically activate the plugins (gdns) and addons. The problem with this naive approach is that other user enabled addons are disabled when restarting a project for example. This is something that needs to be addressed as it can break people's projects. This problem wasn't noticed before because I've tested the integration on a clean project.

alessandrofama commented 3 years ago

Fixed by https://github.com/alessandrofama/wwise-godot-integration/commit/ab62317011ea38addf705f3701cecf3f41eee42c. Wwise addons and the debug library will be added directly to the project.godot file when installing the integration with the integration app.

MattKellyGameAudio commented 3 years ago

Hi Alessandro, I see that deleting the override.cfg resolves the issue of the integration disabling other user-enabled addons. However, when adding the integration to a non-fresh project, the project.godot file is now changed and all the input mappings and importer settings are reset in the Godot project settings. I've noticed this on a couple of projects so far and seems consistent. Is this intended behavior / a known issue? Thanks in advance, Matt

alessandrofama commented 3 years ago

Hit Matt, thank you for reporting this issue. I can reproduce new input actions disappearing. By importer setting do you mean any setting under the general tab of the project settings? This was not a known issue and I will look into it.

MattKellyGameAudio commented 3 years ago

Yes, I believe that's correct. Here is what the integration attempted to remove from the godot.project file: [importer_defaults]

texture={ "compress/bptc_ldr": 0, "compress/hdr_mode": 0, "compress/lossy_quality": 0.7, "compress/mode": 0, "compress/normal_map": 0, "detect_3d": false, "flags/anisotropic": false, "flags/filter": false, "flags/mipmaps": false, "flags/repeat": 0, "flags/srgb": 2, "process/HDR_as_SRGB": false, "process/fix_alpha_border": true, "process/invert_color": false, "process/premult_alpha": false, "size_limit": 0, "stream": false, "svg/scale": 1.0

and tried to replace with: texture={

I've only noticed this in 1 of 2 integrations. Seems as though the integration is attempting to overwrite the working project.godot file with the values that are in the Wwise integration project.godot file instead of just adding new changes. Hope this helps. "[Importer_defaults]" is located directly above "[inputs]" in the project.godot file, in this case.

alessandrofama commented 3 years ago

Unfortunately the issue is hard to fix quickly. The main problem is that the project.godot file contains both ini-style configurations mixed with Godot-specific types as Dictionaries or Arrays, including special cases for platforms overrides that makes it hard to parse properly with the (poorly) methods I've used in the integration app. I did miss some cases that were present in your configuration.

Could you please try this version of the integration app I've attached below on a backup project, it should at least prevent input mappings and other settings from being deleted. The project.godot file will contain duplicate data after install, but that should be fixed by Godot after starting the project without any data loss. Warning: this won't work if you have any platforms overrides in the project settings.

If it works for you I will close this issue and open another one to deal with the problem (since this was about the override.cfg).

I've already explored other solutions about this issue in the past, for example importing a .zip file containing everything from our Integration to the Asset Lib in Godot. But that method doesn't activate our addons or adds the appropriate classes to the AutoLoad tab of the project settings for example. From a user perspective I really want to make the installation process as seamless as possible, I don't know if parsing the project.godot file properly and injecting our stuff there is the right solution yet. This is something we will think about and fix in the long term. I've already a solution in mind that would only require an extra step from the user to activate everything. Hopefully I can work on that soon.

Cheers

Mac OS: https://github.com/alessandrofama/wwise-godot-integration/suites/2206962691/artifacts/45617834 Windows: https://github.com/alessandrofama/wwise-godot-integration/suites/2206962685/artifacts/45618156

MattKellyGameAudio commented 3 years ago

I tested the version of the integration app you shared. It looks like the integration is no longer deleting the input mappings and other settings, so success on that. I figured this would not be an easy fix. So thank you for getting back to this so promptly. If you would like to close this issue and open another one that is perfectly fine by me. Initially, I used source control to remove the changes to input mappings and the other settings. But I'm glad to see that you we're able to find a solution. Thanks for all the effort you're putting into the integration, your doing a great job, keep it up!

alessandrofama commented 3 years ago

Thank you Matt, I really appreciate it! Thank you also for coming here and reporting this issue. That is really very helpful! I will close this one here and prepare another one.