I wanted to use firebase for Unity. Initially after struggling for about an hour I was able to store and retrieve my data from the cloud. If you are a beginner then clone the following code from github and you can view my code.
All you have to do is put your own firebase app link and google-services.json file.