Skip to content

Commit

Permalink
fixed some 2.0 bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
vaporvee committed May 16, 2023
1 parent a8c4f33 commit 7c66fbc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
Binary file not shown.
Binary file not shown.
10 changes: 5 additions & 5 deletions project/addons/discord-sdk-gd/plugin.gd
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ const ExportPlugin = preload("res://addons/discord-sdk-gd/export.gd")
var loaded_exportplugin = ExportPlugin.new()


func _enable_plugin() -> void:
print("DiscordSDK Addon got enabled")
func _enter_tree() -> void:
add_custom_type("DiscordSDKLoader","Node",DiscordSDKLoader,DiscordSDKLoader_icon)
add_custom_type("DiscordSDKDebug","Node",DiscordSDKDebug,DiscordSDKDebug_icon)
add_autoload_singleton("DiscordSDKLoader", "res://addons/discord-sdk-gd/nodes/core_updater.gd")
add_export_plugin(loaded_exportplugin)

ProjectSettings.set_setting("DiscordSDK/EditorPresence/enabled",false)

func _enable_plugin():
print("DiscordSDK Addon got enabled")
ProjectSettings.set_setting("DiscordSDK/EditorPresence/enabled",false)
ProjectSettings.set_initial_value("DiscordSDK/EditorPresence/enabled",false)
ProjectSettings.set_restart_if_changed("DiscordSDK/EditorPresence/enabled",true)

func _disable_plugin() -> void:
print("DiscordSDK Addon got disabled")
remove_autoload_singleton("DiscordSDKLoader")
Expand Down
4 changes: 4 additions & 0 deletions project/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

config_version=5

[DiscordSDK]

EditorPresence/enabled=true

[application]

config/name="GDExtension DiscordSDK Test Project"
Expand Down

0 comments on commit 7c66fbc

Please sign in to comment.