diff options
author | Fredia Huya-Kouadio <fhuya@meta.com> | 2023-11-26 21:30:48 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-26 21:30:48 -0800 |
commit | c8ef744880f82855cff68d941980fb399c4b2212 (patch) | |
tree | e26fca3a65bf4ce1b2ed76e6814b3c7419388868 /plugins/hello_signals/src | |
parent | 09386ad9c0070fcaa47262ea6a73542cf8fa2d57 (diff) | |
parent | f32f5b0022629454e135e3dae3c88d5f2a022466 (diff) | |
download | godot-android-samples-c8ef744880f82855cff68d941980fb399c4b2212.tar.gz godot-android-samples-c8ef744880f82855cff68d941980fb399c4b2212.tar.bz2 godot-android-samples-c8ef744880f82855cff68d941980fb399c4b2212.zip |
Merge pull request #5 from m4gr3d/fix_export_scripts_packaging
Update the logic to package the plugins
Diffstat (limited to 'plugins/hello_signals/src')
3 files changed, 0 insertions, 67 deletions
diff --git a/plugins/hello_signals/src/main/assets/addons/hello_signals_plugin/hello_signals_export_plugin.gd b/plugins/hello_signals/src/main/assets/addons/hello_signals_plugin/hello_signals_export_plugin.gd deleted file mode 100644 index 6145d44..0000000 --- a/plugins/hello_signals/src/main/assets/addons/hello_signals_plugin/hello_signals_export_plugin.gd +++ /dev/null @@ -1,33 +0,0 @@ -@tool -extends EditorPlugin - -# A class member to hold the export plugin during its lifecycle -var export_plugin : AndroidExportPlugin - -func _enter_tree(): - # Initialization of the plugin goes here. - export_plugin = AndroidExportPlugin.new() - add_export_plugin(export_plugin) - - -func _exit_tree(): - # Clean-up of the plugin goes here. - remove_export_plugin(export_plugin) - export_plugin = null - - -class AndroidExportPlugin extends EditorExportPlugin: - - func _supports_platform(platform): - if platform is EditorExportPlatformAndroid: - return true - return false - - func _get_android_libraries(platform, debug): - if debug: - return PackedStringArray(["hello_signals_plugin/bin/debug/HelloSignals.debug.aar"]) - else: - return PackedStringArray(["hello_signals_plugin/bin/release/HelloSignals.release.aar"]) - - func _get_name(): - return "Hello Signals plugin" diff --git a/plugins/hello_signals/src/main/assets/addons/hello_signals_plugin/hello_signals_plugin_interface.gd b/plugins/hello_signals/src/main/assets/addons/hello_signals_plugin/hello_signals_plugin_interface.gd deleted file mode 100644 index 0cc9c1d..0000000 --- a/plugins/hello_signals/src/main/assets/addons/hello_signals_plugin/hello_signals_plugin_interface.gd +++ /dev/null @@ -1,27 +0,0 @@ -class_name HelloSignalsPlugin extends Object - -## Interface used to access the functionality provided by the HelloSignals plugin - -var _hello_signals_singleton - -func _init(): - if Engine.has_singleton("HelloSignals"): - _hello_signals_singleton = Engine.get_singleton("HelloSignals") - else: - printerr("Couldn't find HelloSignals singleton") - - -## Register for the tiktok signals emitted -func registerForTikTok(callback: Callable) -> void: - if _hello_signals_singleton: - _hello_signals_singleton.connect("TikTok", callback) - else: - printerr("Unable to register for tiktok") - - -## Start tiktok if not started, otherwise stop it -func toggleTikTok(): - if _hello_signals_singleton: - _hello_signals_singleton.onButtonPressed() - else: - printerr("Unable to toggle tiktok") diff --git a/plugins/hello_signals/src/main/assets/addons/hello_signals_plugin/plugin.cfg b/plugins/hello_signals/src/main/assets/addons/hello_signals_plugin/plugin.cfg deleted file mode 100644 index 4ffab22..0000000 --- a/plugins/hello_signals/src/main/assets/addons/hello_signals_plugin/plugin.cfg +++ /dev/null @@ -1,7 +0,0 @@ -[plugin] - -name="Hello Signals plugin" -description="Showcases how to package a sample Android plugin" -author="Fredia Huya-Kouadio" -version="" -script="hello_signals_export_plugin.gd" |