Unity Firebase: Solution to Database URL not set in the Firebase config Error

Unity Firebase : Database URL not set in the Firebase config Hatası Çözümü


Unity Firebase: Solution to Database URL not set in the Firebase config Error

 Hello everyone, today I want to talk about an issue that those who want to use Firebase on Unity and beginners may encounter, and its solution. 

Our issue is "Database URL not set in the Firebase config." and if I need to translate it into Turkish, it would be "Veri tabanı URL'si Firebase ayar dosyasında bulunamadı".

Note: I can't say my English is very good, but I think providing the problem for you in Turkish may at least give you an idea.


Unity Firebase Data URL not set in the Firebase config

Anyway, normally I would open a new section below and explain the solution to the error from there, but in this post let me do something different and directly talk about the solution. 

When doing Firebase setup, open the "google-services.json" file that we downloaded and put inside the "Assets" folder and in the "project_info": section, add "firebase_url": "Firebase URL", and you solve the problem.

 If you don't know where to get the URL that you need to enter here, log into Firebase and in the "Realtime Database" section, in the Data menu, you'll see it written in large letters at the very top. 

Click here to go to Firebase.


The file we need to edit

The google-services.json file that we need to edit is the one shown in the image above. 

Note for those who don't know: The blue mark at the top right corner of the file indicates that the file is ready to be uploaded for collab, or more precisely, it indicates that it's different from other versions or versions on other users – I will write about what collab is in future posts.


Unedited version

This is how your file will look like when it's not edited; the important place here is the "project_info" section at the top where we add the database address.

Go to the Firebase site from the link I gave above and copy the address in the area shown in the image below.


URL Area

Now, after you copy the URL here, you can enter it as "firebase_url" : "URL" in between the "{}" tags in the "project_info" section and you will be free from this error.

Solution

For security, I censored a bit (A bit??? You've censored 95%), please forgive me, and if you have any questions or get stuck at any stage, don't hesitate to leave your question in the comments section below.