-
Notifications
You must be signed in to change notification settings - Fork 12
/
export_plugin.gd
42 lines (32 loc) · 1.1 KB
/
export_plugin.gd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@tool
extends EditorPlugin
# A class member to hold the editor 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:
# TODO: Update to your plugin's name.
var _plugin_name = "GodotAndroidPluginTemplate"
func _supports_platform(platform):
if platform is EditorExportPlatformAndroid:
return true
return false
func _get_android_libraries(platform, debug):
if debug:
return PackedStringArray([_plugin_name + "/bin/debug/" + _plugin_name + "-debug.aar"])
else:
return PackedStringArray([_plugin_name + "/bin/release/" + _plugin_name + "-release.aar"])
func _get_android_dependencies(platform, debug):
# TODO: Add remote dependices here.
if debug:
return PackedStringArray([])
else:
return PackedStringArray([])
func _get_name():
return _plugin_name