-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
284a2d9
commit 4465ab1
Showing
3 changed files
with
44 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[plugin] | ||
|
||
name="Wwise Setup" | ||
description="" | ||
author="" | ||
version="1.0" | ||
script="wwise_setup.gd" |
29 changes: 29 additions & 0 deletions
29
wwise-gdnative/gdnative-demo/addons/wwise_setup/wwise_setup.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
tool | ||
extends EditorPlugin | ||
|
||
var timer:Timer | ||
|
||
func _enter_tree(): | ||
timer = Timer.new() | ||
timer.connect("timeout",self,"_on_timer_timeout") | ||
timer.wait_time = 5 | ||
timer.one_shot = true | ||
add_child(timer) | ||
timer.start() | ||
print("Starting Wwise Setup in 5 seconds...") | ||
|
||
func _on_timer_timeout(): | ||
call_deferred("add_autoload_singleton", "WwiseSettings", "res://wwise/wwise_settings.gd") | ||
call_deferred("add_autoload_singleton", "Wwise", "res://wwise/bin/wwise-gdnative.gdns") | ||
call_deferred("add_autoload_singleton", "Waapi", "res://wwise/bin/waapi-gdnative-debug.gdns") | ||
get_editor_interface().call_deferred("set_plugin_enabled", "res://addons/wwise_build_export/plugin.cfg", true) | ||
get_editor_interface().call_deferred("set_plugin_enabled", "res://addons/wwise_ids_converter/plugin.cfg", true) | ||
get_editor_interface().call_deferred("set_plugin_enabled", "res://addons/wwise_custom_nodes/plugin.cfg", true) | ||
get_editor_interface().call_deferred("set_plugin_enabled", "res://addons/waapi_picker/plugin.cfg", true) | ||
ProjectSettings.save() | ||
timer.call_deferred("free") | ||
get_editor_interface().call_deferred("set_plugin_enabled", "res://addons/wwise_setup/plugin.cfg", false) | ||
|
||
func _exit_tree(): | ||
print("Wwise setup completed successfully") | ||
ProjectSettings.save() |