Skip to content

Commit

Permalink
Use call_deferred in the editor to emit signals
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandrofama committed Jan 22, 2025
1 parent b61aaac commit cfcd1c2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion addons/Wwise/native/src/editor/ak_wwise_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ void AkWwiseTree::_on_item_activated()
case WwiseObjectType::GameParameter:
case WwiseObjectType::AcousticTexture:
case WwiseObjectType::Trigger:
emit_signal("ws_wwise_property_activated", wwise_tree_item);
call_deferred("emit_signal", "ws_wwise_property_activated", wwise_tree_item);
break;
default:
break;
Expand Down
2 changes: 1 addition & 1 deletion addons/Wwise/native/src/editor/plugins/ak_json_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ void AkJSONBuilder::_process(double p_delta)
if (all_completed)
{
all_tasks_completed = true;
WwiseProjectInfo::get_singleton()->emit_signal("ws_populate_completed");
WwiseProjectInfo::get_singleton()->call_deferred("emit_signal", "ws_populate_completed");
current_platform_data = nullptr;
running = false;
}
Expand Down
4 changes: 2 additions & 2 deletions addons/Wwise/native/src/editor/plugins/wwise_project_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void WwiseProjectInfo::_process(double p_delta)
if (completed)
{
running = false;
emit_signal("ws_updating_assets_completed");
call_deferred("emit_signal", "ws_updating_assets_completed");
}
}

Expand Down Expand Up @@ -198,7 +198,7 @@ void WwiseProjectInfo::_on_populate_completed()
void WwiseProjectInfo::_on_updating_assets_completed()
{
EditorInterface::get_singleton()->get_resource_filesystem()->scan();
emit_signal("ws_refresh_completed");
call_deferred("emit_signal", "ws_refresh_completed");
UtilityFunctions::print("WwiseGodot: Project has been refreshed successfully.");
}

Expand Down
2 changes: 1 addition & 1 deletion addons/Wwise/native/src/editor/wwise_project_database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ void WwiseProjectDatabase::post_init_callback()
ProjectSettings::get_singleton()->save();
}

emit_signal("ws_soundbank_directory_updated");
call_deferred("emit_signal", "ws_soundbank_directory_updated");
}

bool WwiseProjectDatabase::init(const String& p_directory_path, const String& p_directory_platform_name)
Expand Down

0 comments on commit cfcd1c2

Please sign in to comment.