From eea73c96fa35abb60f37a4fb91a170f737d8207d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20Ib=C3=A1=C3=B1ez=20S=C3=A1nchez?= Date: Thu, 29 Feb 2024 20:52:03 +0100 Subject: [PATCH] Remove plugin activated by default and update demo project readme --- docs/images/demo_project_error.png | Bin 0 -> 9088 bytes plugin/demo/README.adoc | 11 ++++++++++- plugin/demo/project.godot | 13 +++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 docs/images/demo_project_error.png diff --git a/docs/images/demo_project_error.png b/docs/images/demo_project_error.png new file mode 100644 index 0000000000000000000000000000000000000000..3ed4089ebd0ada15809e47335011d74be616f7aa GIT binary patch literal 9088 zcmb_?bx<8m_a;tocXtTxZoyrHyIlwlK`$O$gZsskKyY_=mjrir2y*eu^5*@0wSRnD zTeVeNHPSuPeNNAr?$b~Ad7{)+<3aIR80cPvpM`*9?3;s-yI4Hz3-nBddT^Q6%-T=o`STbwztVy zE}}Q?Z~P%O><>u1ze1r3yo$q|ijf$}Br*G87?BHuC?h|sw=(kWF6F&LPWTo?DSy#% zxBfv1rXT`5`D#UV86XaRWoyB)B5rsK-^9jba-z z;%LMjXnTh~B8SC*L1GwPC?f9{_ZnTu_;!p+$%bYAO+}~Y_bO}P%4pyYD5;x&`{!l! zHr)>nt$!ZL{K3}FVES9d8%YeW@8o2``frIsZ)jr9|1R=={BJFdb~rqne-)X8AanmC zNCTH$^8Z=m|5aSicMI>Awn6v5(owm-UzXS$X=&XCY2zkwg`El$0b|mP;!23pE46Ma zR%+EA?ldlri0d7P*rEme=NFSdi@0IcX?KeKVqp~BQ{8bs{il&B#U;MW+C02o_{W49 zY0<@sl1F~>;=K)p4k2Df0mg`$)OwNn$feERB}VY1@#A5)k7WW- zdpspvj2%mwTg|j^3sDqU)rQKLq5{EK3RHy{>YLE9-!1{ubfk@W!HktI^Po2yt;>2# zC=!#UB+}wS4>Oh!|BZ)fED$ykT?cXY7jXo|9n39=2Z9%a;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$&CZvRpniM$EmSVQx(%2UfATg08qJ+bsmi+EVN9$5w?2if) zfGI9jFohR&*R8DZW8@RH^xiHLcU+MIY-bGejKGZ{u(@^pJjmB+sa8t*VLG_uXyiR! ziHQ!THBZsDzybe;T1ux_4$#(rI*s-I#kJJ~nUC8rcb{gbFu$kZu^ea_^b>N7G%}N>L(*mXJ}mVi zf|0uh58z$VbQzE^`9}dFCFeJ|bNnePwpXVd!sSt>eTAcf0h1TKb(;%3ell}x@EhbV zyu6K19!VWS8JD2cll6NJ3%$bIbA_AvW&Y(+J|M9pn-+I(1EF(W@LWlHlyVfG z#lY#bg@1Lz&;#+g9a~3BjN(=5xeT#iB!I+yXa6jP!ArGFM^G7#CDgjf2@YGxOgf<+BzK&Ml0UNIWp@7Zmepog3i|UuJPmgXXCr 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. @@ -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. diff --git a/plugin/demo/project.godot b/plugin/demo/project.godot index 15b9f1a..9b0c43e 100644 --- a/plugin/demo/project.godot +++ b/plugin/demo/project.godot @@ -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={