Adding Firebase SDK In Unity WebGL builds!

preview_player
Показать описание
Are you looking to develop a WebGL Unity App and you want to use Unity but just found out the Firebase SDK doesn't work? This might solve your problems!
- - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - -
#firebase #unity #webgl
Рекомендации по теме
Комментарии
Автор

A few updates on the video:

1) The library now also supports Cloud Firestore basic requests (along with Auth, Storage and Cloud functions)

2) I will copy-paste John Louis-Strakes Lopez's comment on updates on the WebGL build:
Earlier in 2021 Unity made some modifications to their WebGL library, and a few things in this video became outdated. When applying the below tweaks, however, everything should work as expected:

Instead of saying in your JSLib, you want to say There's no need to include 'Module', and your browser is going to throw a hissy fit because it can't identify unityInstance. In addition, you need to make sure your script.onload function in index.html looks like this:

script.onload = () => {
createUnityInstance(canvas, config, (progress) => {
progressBarFull.style.width = 100 * progress + "%";
}).then((unityInstance) => {
window.unityInstance = unityInstance;
loadingBar.style.display = "none";
fullscreenButton.onclick = () => {

};
}).catch((message) => {
alert(message);
});

In other words, you need to incorporate the following line: window.unityInstance = unityInstance;

This is now fixed and incorporated in the library!

uNicoDev
Автор

Videos like these are a rare gem. Just when you need it most. Very nice job and objective explanation, mate. So much content in 25 minutes.

farrael_
Автор

Its been 2 years, and this is still the best solution out there!
Your library is so extensive and well thought out, you could sell it.
Thanks a lot

samuelhuber
Автор

I cant begin to explain how useful your code has been. Thanks a lot!! Awesome work!

moltoni
Автор

This is freakin awesome mate! Good job very straight forward.

alfredomercado
Автор

We should make a statue of you. Thanks from a fellow italian for your amazing work!

filippofrattapasini
Автор

Hey mate! amazing workaround, it is still functional in 2023!

brianaleon
Автор

Man are you even real :O, big thumbs up for making this!

squer
Автор

Great Library, thanks so much for saving us hours of work !

hadyhesham
Автор

EXCELLENT!! This exactly what I was looking for. Thank you very much!!

upwarestudios
Автор

How can I update data and not just read data?

DanyMaorMico
Автор

oh! you rock man! it was awesome! thank you for that

KastroLoL
Автор

I am trying to run your git project I build the auth scene, when I clicked the sign up button I got the error firebase not defined

abudriaz
Автор

Hello there!

Amazing! But do you think it's still working? Because I take the plug to test it, and just when I build the plugin test scene... I have a lot of errors in WebGL

GwenCinoS
Автор

hi mate! havent seen you in awhile! hope you are having a good day!

flipcrafty
Автор

You're awesome! Thanks for sharing this!

lefeezy
Автор

Make sure SendMessage is "SendMessage" not "sendMessage"

mathtabla
Автор

Thank you this video really helped a lot! :D

mariotcarreon
Автор

I got firebase is not defined (in firebase.database() lines). Could you help?

dezhung
Автор

Hello Domenico, I am new to your channel and I found it very useful. I am starting a chat in Unity and I am not sure if I should go with the Firebase SDK or trying to develop it using the Firebase Rest API. It is a simple project and I would like to have it available as a webgl first. I can see here you found a work around, at the same time can you tell me the drawback of developing it without the SDK? What are the main advantages of using the SDK? Is it that with rest API I cannot get instance updates?

GuidoSalimbeni