GodotNuts / GodotFirebase

Implementations of Firebase for Godot using GDScript
MIT License
532 stars 76 forks source link

Emulator support alpha #240

Closed fenix-hub closed 2 years ago

fenix-hub commented 2 years ago

Pretty big PR here.

Firebase Emulators?

+ additions:
This adds full support for Firebase Emulators, giving the ability to test locally all the modules provided by our plugin. To start the emulated environment, call the function Firebase.set_emulated(true) or check the export variable emulating in addons/godot-firebase/firebase/firebase.tscn. If the plugin has not been configured yet, several error messages will be printed to tell you what to do. godot windows opt tools 64_ApJeqsbwWa The ".env" file will now hold an additional section to store the ports related to your emulators: firefox_9w3oLhwlrO

notepad++_Wm4NRQRDe7

Once configured, if you are in emulated environment our library will directly communicate with your emulators with no additional configurations required. You can switch back to not emulated just calling the function Firebase.set_emulated(false) in your code, or stopping your project and setting back the export variable emulating to false.

! breaking changes:
functionsBaseUrl field in your ".env" file has now been replaced with functionGeoZone notepad++_S741bhSXjy GeoZone (or Region) is the place where your functions are stored. If you already had that setting configured, just copy-paste the first fragment of the baseUrl (the one that contains the region) and paste it inside the functionsBaseUrl field. Otherwise you can find it in your functions in Firebase 6FRNuZbAfS