Skip to content

Commit

Permalink
Merge pull request #78 from alessandrofama/fix-load-init-bank-startup…
Browse files Browse the repository at this point in the history
…-names

Fix load_init_bank_at_startup compatibility Issue with use_soundbank_names setting
  • Loading branch information
alessandrofama authored Sep 6, 2023
2 parents 78d5832 + 1467296 commit 8e14711
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions addons/Wwise/native/src/wwise_gdextension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,20 @@ void Wwise::init()
bool load_init_bank_at_startup =
get_platform_project_setting(WWISE_COMMON_USER_SETTINGS_PATH + "load_init_bank_at_startup");

bool use_soundbank_names = get_platform_project_setting(WWISE_COMMON_USER_SETTINGS_PATH + "use_soundbank_names");

if (load_init_bank_at_startup)
{
AkUInt32 initBankID = AK::SoundEngine::GetIDFromString("Init");
load_bank_id(initBankID);
if (use_soundbank_names)
{
String init_bank_name = "Init";
load_bank(init_bank_name);
}
else
{
AkUInt32 initBankID = AK::SoundEngine::GetIDFromString("Init");
load_bank_id(initBankID);
}
}
}

Expand Down

0 comments on commit 8e14711

Please sign in to comment.