Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"firebase is not defined" #5

Closed
artfail opened this issue Oct 15, 2021 · 2 comments
Closed

"firebase is not defined" #5

artfail opened this issue Oct 15, 2021 · 2 comments

Comments

@artfail
Copy link

artfail commented Oct 15, 2021

I keep getting "firebase is not defined" text output. I read all the comments and I have updated with the current changes that were posted. I am running Unity 2020.3.20 and firebase 9.1.3 which is the current link when registering a web app.

@JaduBen
Copy link

JaduBen commented Nov 30, 2021

I think I solved this by modifiying the following, take this with a grain of salt since other things are still broken for me

script.onload = () => {
     createUnityInstance(canvas, config, (progress) => {
         progressBarFull.style.width = 100 * progress + "%";
     }).then((unityInstance, firebase) => {
         // This is needed to make the Unity Firebase WebGL Library work properly
         this.unityInstance = unityInstance;
         this.firebase = firebase; // Add this to resolve "firebase is not defined" (also add to capture above)
         loadingBar.style.display = "none";
         fullscreenButton.onclick = () => {
             unityInstance.SetFullscreen(1);
         };
     }).catch((message) => {
         alert(message);
     });
 };

@JaduBen
Copy link

JaduBen commented Dec 1, 2021

update, i did a clean build and cleared my cache, this seems to have sorted it out without my previous change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants