/Firebase-Unity

Testing Firebase with Unity

Primary LanguageC#

Firebase-Unity

Firebase is a realtime database system. You can use it to store your player data like highscore,transcation data,etc.

To use Firebase with unity, you need to create firebase acc. and a project in your acc. You can find more info about how to setup a firebase project here - https://www.youtube.com/watch?v=uj6rs3HFg5o

Start method

The start method is called at the beginning of the scene. We see the Datareference variable is initialsed here as you want to point to your db from the beggining of the execution.

Class User

Here the class User is used my me to store the user data as a single object. This is a good way to organise data in a object oriented DB acc. to me.

AddData() method

The add data method is called when the Add button is clicked from the scene,it is given the input field as the parameter and the text in the input field is passed to constructor of User class.

RefreshData() method

Too bored to type now, will add descp soon. Sorry :(