Need to use Firebase on your WebGL project? You came to the right place! This plugin allows you to use the firebase modular api on webgl builds. You can use the following modules.
For more details about this asset from the Unity Asset Store, please visit: Click Here
This is a paid asset, but now you can download the “WebGL API for Firebase” for FREE. Please note that this package is provided solely for learning purposes or to test the product before purchase, and not for commercial use.
WebGL API for Firebase v10.7.1 (Latest version)
“If possible, please buy the package to support the developer”
Description
This plugin allows you to use the firebase modular api on webgl builds. You can use the following modules.
Analytics
App
App-check
Auth
Database
Firestore
Firestore/lite
Functions
Installations
Messaging
Performance
Remote-config
Storage
The method calls and usage follow the official api as much as possible, so you can follow the official docs and tutorials for the firebase modular api with ease.
There are several examples included and most of the api was implemented. I’d say close to 100%. You can find more info in the Technical details section.
If you enjoy this plugin, please consider leaving a review. It helps me immensely and encourages me to improve the plugin further, and other people to support my work :).
LIMITATIONS
It does not work in the editor, only in the actual build. However, because the plugin follows the official API, you can easily do local testing with an index.html file and apply it to your Unity project. More details in the docs.
Technical details
You can check below an overview of the features that were implemented. I do not implement
obsolete, deprecated, or otherwise API that is not recommended to use, or type aliases (not losing functionality).
This plugin supports using the emulator when available.
ANALYTICS
Everything was implemented, except CustomParams.
HIGHLIGHTS
Supports logging events (default and custom ones).
Supports setting user properties.
Supports measuring screenviews.
Supports setting a user ID.
Supports measuring ecommerce.
APP
Everything was implemented.
APP-CHECK
Everything was implemented.
HIGHLIGHTS
Supports using reCAPTCHA Enterprise.
Supports using reCAPTCHA V3.
Supports using a custom provider.
AUTH
Everything was implemented, except: getReactNativePersistence, ReactNativeAsyncStorage, cordovaPopupRedirectResolver, MultiFactorError (you don’t lose functionality though, AuthError suffices as operationType can be accessed from customData).
HIGHLIGHTS
Supports the signInWithPopup and signInWithRedirect family of functions.
Supports password authentication and email link.
Supports Google, Facebook, Apple, Twitter, Github, Microsoft, Yahoo, OpenID Connect, SAML, Custom Auth.
Supports Phone Auth.
Supports Anonymous Auth.
Supports SMS Multi-factor Auth and TOTP Multi-factor Auth.
Supports Account Linking.
Supports using the emulator.
DATABASE
Everything was implemented, except ThenableReference (you don’t lose functionality though, as the push method was modified to compensate).
HIGHLIGHTS
Supports using custom classes and dictionaries to write to and read from RTDB.
Supports read and write data.
Supports working with lists of data.
Supports enabling offline capabilities.
Supports using the emulator.
FIRESTORE
Everything was implemented, except: PartialWithFieldValue and all partial functions; FirestoreDataConverter (not losing functionality, see below).
HIGHLIGHTS
You can use custom classes and dictionaries to write to and read from Firestore.
Supports all data types. In addition, it also has built-in support for DateTime and DatimeTimeOffset.
Supports adding data.
Supports transactions and batched writes.
Supports FieldValue such as serverTimestamp.
Supports deleting data.
Supports getting data.
Supports getting real-time updates.
Supports performing simple and compound queries.
Supports ordering and limiting data.
Supports aggregation queries.
Supports data pagination with query cursors.
Supports accessing data offline.
Supports using the emulator.
FUNCTIONS
Everything was implemented.
HIGHLIGHTS
Supports httpsCallable.
Supports httpsCallableFromURL.
Supports using the emulator.
INSTALLATIONS
Everything was implemented.
MESSAGING
Everything was implemented.
HIGHLIGHTS
Supports deleting a token.
Supports getting a token.
Supports onMessage.
Supports receiving messages.
PERFORMANCE
Everything was implemented.
HIGHLIGHTS
Supports getting a trace.
Supports all trace methods.
REMOTE-CONFIG
Everything was implemented.
HIGHLIGHTS
Supports setting a minimum fetch interval.
Supports setting in-app default parameter values
Supports getting parameter values.
Supports setting parameter values.
Supports fetching and activating values.
STORAGE
Everything was implemented, except: getBlob and getStream.
HIGHLIGHTS
Supports creating a reference.
Supports uploading from a byte array.
Supports uploading from a string.
Supports managing uploads.
Supports monitoring upload progress
Supports using file metadata.
Supports downloading data directly from the SDK (getBytes).
Supports getting the download URL and then using something like UnityWebRequest to get the data.
Supports using the emulator.