-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the 'Hello World' Android plugin to match the new Godot 4.2 fo…
…rmat See godotengine/godot#78958 for reference.
- Loading branch information
Showing
18 changed files
with
164 additions
and
104 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ | |
/captures | ||
.externalNativeBuild | ||
.cxx | ||
.godot |
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,11 @@ | ||
ext { | ||
versions = [ | ||
gradlePluginVersion: '7.2.1', | ||
compileSdk : 33, | ||
minSdk : 21, | ||
targetSdk : 33, | ||
godotLibVersion : '4.0.3.stable', | ||
javaVersion : JavaVersion.VERSION_11, | ||
kotlinVersion : '1.7.21', | ||
] | ||
} |
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
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 |
---|---|---|
@@ -1,20 +1,19 @@ | ||
[gd_scene load_steps=2 format=2] | ||
[gd_scene load_steps=2 format=3 uid="uid://bgtr75kiyu5fh"] | ||
|
||
[ext_resource path="res://Main.gd" type="Script" id=1] | ||
[ext_resource type="Script" path="res://Main.gd" id="1"] | ||
|
||
[node name="Main" type="Node2D"] | ||
script = ExtResource( 1 ) | ||
script = ExtResource("1") | ||
|
||
[node name="Button" type="Button" parent="."] | ||
anchors_preset = 14 | ||
anchor_top = 0.5 | ||
anchor_right = 1.0 | ||
anchor_bottom = 0.5 | ||
margin_left = 40.0 | ||
margin_top = 250.0 | ||
margin_right = 320.0 | ||
margin_bottom = 312.0 | ||
offset_left = 40.0 | ||
offset_top = 250.0 | ||
offset_right = 320.0 | ||
offset_bottom = 312.0 | ||
text = "Hello World" | ||
__meta__ = { | ||
"_edit_use_anchors_": true | ||
} | ||
|
||
[connection signal="pressed" from="Button" to="." method="_on_Button_pressed"] |
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 @@ | ||
|
Binary file not shown.
Binary file not shown.
16 changes: 16 additions & 0 deletions
16
hello_world/demo/addons/hello_world_plugin/hello_world_export_plugin.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,16 @@ | ||
@tool | ||
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_world_plugin/HelloWorld.debug.aar"]) | ||
else: | ||
return PackedStringArray(["hello_world_plugin/HelloWorld.release.aar"]) | ||
|
||
func _get_name(): | ||
return "HelloWorldPlugin" |
17 changes: 17 additions & 0 deletions
17
hello_world/demo/addons/hello_world_plugin/hello_world_plugin.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,17 @@ | ||
@tool | ||
extends EditorPlugin | ||
|
||
# A class member to hold the export plugin during its lifecycle. | ||
var export_plugin : EditorExportPlugin | ||
|
||
func _enter_tree(): | ||
# Initialization of the plugin goes here. | ||
export_plugin = preload("hello_world_export_plugin.gd").new() | ||
add_export_plugin(export_plugin) | ||
pass | ||
|
||
|
||
func _exit_tree(): | ||
# Clean-up of the plugin goes here. | ||
remove_export_plugin(export_plugin) | ||
export_plugin = null |
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="HelloWorldPlugin" | ||
description="Sample to showcase how to package a Godot Android plugin " | ||
author="Fredia Huya-Kouadio (m4gr3d)" | ||
version="" | ||
script="hello_world_plugin.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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[gd_resource type="Environment" load_steps=2 format=2] | ||
[gd_resource type="Environment" load_steps=2 format=3 uid="uid://bi2meuxrf37pv"] | ||
|
||
[sub_resource type="ProceduralSky" id=1] | ||
[sub_resource type="Sky" id="1"] | ||
|
||
[resource] | ||
background_mode = 2 | ||
background_sky = SubResource( 1 ) | ||
sky = SubResource("1") |
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
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
Binary file not shown.
Oops, something went wrong.