Skip to content

Commit

Permalink
Remove plugin activated by default and update demo project readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Iakobs committed Feb 29, 2024
1 parent ce50945 commit eea73c9
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
Binary file added docs/images/demo_project_error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion plugin/demo/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Doc Writer <jacobibanez@jacobibanez.com>

This folder is a Godot project that you can directly open in Godot 4.2 to see an implementation of the plugin in a real Godot game.

IMPORTANT: To use this project, you have to uncompress the contents of the `addons.zip` file in the link:https://github.com/Iakobs/godot-play-game-services/releases[releases section] of the repository to the root folder of the project.
IMPORTANT: To use this project, you have to uncompress the contents of the `addons.zip` file in the link:https://github.com/Iakobs/godot-play-game-services/releases[releases section] of the repository to the root folder of the project. Alternatively, you can run the `./gradlew assemble` command from the root of the repository. This command will install the plugin in the `addons` directory of the godot project.

== Directory Structure
The demo project contains a `scenes` folder with all the `.tscn` and `.gd` files that you will need, everything is inside this folder.
Expand All @@ -23,6 +23,15 @@ You also have to create an `Export Configuration` for Android. Refer to the http

Finally, you can not run the game as a normal game. Instead, you have to run it in an android device (real or emulated) via the `Remote Debug` button in the top right corner of the Godot editor.

== First time opening the demo project
The first time you open the demo project, you will see this error in the Godot editor:

image::demo_project_error.png[alt="Screenshot of an error in the Godot editor that says:\"Failed to load script \"res://scenes/MainMenu.gd\" with error \"Parse Error\".",title=Error loading script at first run of the project.width=298,aligb=center]

This is completely normal, because the plugin is not yet activated. Simply go to `Project > Project Settings > Plugins` and enable the plugin, which should appear there if you have installed it in the `addons` folder.

After enabling the plugin, confirm that the autoloads appear in the `Autoload` tab. Then simply reload your project from `Project > Reload Current Project`, and you are good to go!

== Signing In
The first thing the project does is checking if the user is authenticated, and if not, calls the `sign_in` method of the plugin.

Expand Down
13 changes: 13 additions & 0 deletions plugin/demo/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,25 @@ run/main_scene="res://scenes/MainMenu.tscn"
config/features=PackedStringArray("4.2", "Mobile")
config/icon="res://icon.svg"

[autoload]

GodotPlayGameServices="*res://addons/GodotPlayGameServices/autoloads/godot_play_game_services.gd"
SignInClient="*res://addons/GodotPlayGameServices/autoloads/sign_in_client.gd"
PlayersClient="*res://addons/GodotPlayGameServices/autoloads/players_client.gd"
AchievementsClient="*res://addons/GodotPlayGameServices/autoloads/achievements_client.gd"
LeaderboardsClient="*res://addons/GodotPlayGameServices/autoloads/leaderboards_client.gd"
SnapshotsClient="*res://addons/GodotPlayGameServices/autoloads/snapshots_client.gd"

[display]

window/size/viewport_width=720
window/size/viewport_height=1280
window/handheld/orientation=1

[editor_plugins]

enabled=PackedStringArray("res://addons/GodotPlayGameServices/plugin.cfg")

[file_customization]

folder_colors={
Expand Down

0 comments on commit eea73c9

Please sign in to comment.