Skip to content

Commit

Permalink
Update Godot project and wwise.gd addon script
Browse files Browse the repository at this point in the history
This commit updates the wwise.gd addon script, wrapping up the integration of recent codebase changes by removing the ported plugins from GDScript.

Currently, the only editor plugin still added to the Editor via GDScript is the EditorExportPlugin. This will resolved as soon as a related bug (godotengine/godot#80593) is fixed.
  • Loading branch information
alessandrofama committed Aug 16, 2023
1 parent e85ca2f commit 26c2210
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 85 deletions.
63 changes: 0 additions & 63 deletions addons/Wwise/editor/ak_editor_plugin.gd

This file was deleted.

5 changes: 1 addition & 4 deletions addons/Wwise/editor/waapi_picker/waapi_picker.tscn
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
[gd_scene load_steps=2 format=3 uid="uid://bbq1nrovlwd1x"]

[ext_resource type="Script" path="res://addons/Wwise/editor/waapi_picker/waapi_picker_drag.gd" id="1_71lrd"]
[gd_scene format=3 uid="uid://bomvl5s3ftk53"]

[node name="WwisePickerControl" type="VBoxContainer"]
anchors_preset = 15
Expand Down Expand Up @@ -46,4 +44,3 @@ caret_blink_interval = 0.5
layout_mode = 2
size_flags_vertical = 3
allow_reselect = true
script = ExtResource("1_71lrd")
21 changes: 4 additions & 17 deletions addons/Wwise/wwise.gd
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
@tool
extends EditorPlugin

var editor_plugin: EditorPlugin
var initialized: bool = false

var build_export_plugin: EditorExportPlugin

func _enter_tree():
if !ProjectSettings.has_setting("autoload/WwiseRuntimeManager"):
add_autoload_singleton(
"WwiseRuntimeManager", "res://addons/Wwise/runtime/wwise_runtime_manager.gd"
)

if Engine.is_editor_hint() && !initialized:
editor_plugin = load("res://addons/Wwise/editor/ak_editor_plugin.gd").new()
get_editor_interface().get_base_control().add_child(editor_plugin)
initialized = true
build_export_plugin = load("res://addons/Wwise/editor/ak_build_export.gd").AkBuildExport.new()
add_export_plugin(build_export_plugin)


func _exit_tree():
remove_autoload_singleton("WwiseRuntimeManager")

if Engine.is_editor_hint():
get_editor_interface().get_base_control().remove_child(editor_plugin)
editor_plugin.queue_free()
remove_export_plugin(build_export_plugin)
2 changes: 1 addition & 1 deletion project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ config_version=5
[application]

config/name="Wwise Godot Integration Demo Project"
config/features=PackedStringArray("4.0")
config/features=PackedStringArray("4.1")
run/max_fps=60

[autoload]
Expand Down

0 comments on commit 26c2210

Please sign in to comment.