Unity User Data & Scoreboard Tutorial - Firebase Realtime Database

Sdílet
Vložit
  • čas přidán 11. 06. 2024
  • Unity User Data & Scoreboard Tutorial - Firebase Realtime Database. Hello guys, this is a tutorial on how to save and load user data in unity using the Firebase realtime database. In this video we will go over setting up the realtime database in the Firebase console. Then how to save some simple user data from your unity project to the database and then how to load the data from the database and display it on a scoreboard.
    ----------------------
    Previous video on Firebase Authentication: • Unity User Login Syste...
    GitHub (Download the project): github.com/xzippyzachx/UnityF...
    Firebase console: firebase.google.com/
    UI Asset Used: assetstore.unity.com/packages...
    My Discord: / discord
    My Multiplayer Development Updates Playlist: • Multiplayer Game Updates
    My Website: zxgames.net
    ----------------------
    Time stamps:
    0:00 - Intro
    0:36 - Starter project
    1:06 - Firebase Database Console
    2:58 - Import Firebase Packages
    6:40 - Clean Up
    7:22 - User Data Screen
    8:51 - Sign Out
    11:04 - Save Data
    16:36 - Load User Data
    18:36 - Load Scoreboard Data
    21:50 - Database Rules
    24:16 - Testing
    24:50 - Find Help & Outro
    ----------------------
    Music:
    Lords of Danger
    Source: • Lords of Danger - Inse...
    #Tutorial #GameDev #Firebase #Unity3D #Unity #GameDevelopment

Komentáře • 369

  • @xzippyzachx
    @xzippyzachx  Před 3 lety +39

    *IMPORTANT!!!* These are some common issues and changes that are required since curtain parts of this tutorial are out of date.
    - The Unity package manager is no longer used to install the Firebase SDK. To install the Firebase packages start by removing any Firebase assets you may have in your project. Download the newest .unitypackage file from this link developers.google.com/unity/archive#firebase_realtime_database. Then in Unity go to Assets > Import Package > Custom Package. Now import the .unitypackage you downloaded. The Firebase core/auth/realtime-database packages will now be installed in your Unity project.
    - You may need to delete and re-download a new google-services.json file. Download it from your project settings in the Firebase console. Then put the new file in your Assets folder again.
    - There are also some code changes since this video was recorded. Make sure to check the GitHub repo for the most up-to-date code.
    If you still have issues feel free to open a help post on my Discord server: discord.gg/7rGAAqC

    • @darshankirubakaran671
      @darshankirubakaran671 Před 3 lety +2

      Thanks a lot I was struggling to get my database to work and after re-downloading the json file it is working and thanks for the well explained video

    • @user-tr3ng7vm5w
      @user-tr3ng7vm5w Před 3 lety

      How to save data without the button, please I need your help!!!

    • @noumanmobstudios7167
      @noumanmobstudios7167 Před 2 lety +2

      @@user-tr3ng7vm5w Just call the function where you have to save data
      for example : savedata();
      call this function instead of pressing on button

    • @user-tr3ng7vm5w
      @user-tr3ng7vm5w Před 2 lety

      @@noumanmobstudios7167 thanks, my school project already end

    • @marvicbautista7080
      @marvicbautista7080 Před 2 lety

      HI what if i dont have .net 4 on my unity?

  • @bitesupper8691
    @bitesupper8691 Před 2 lety +1

    Thanks, I was wondering for a while on how a logged in user modifies the realtime database with authentication checks. Finally it made sense to me when you explained the database rules at the end of your video.

    • @xzippyzachx
      @xzippyzachx  Před 2 lety +1

      Glad it helped! I barley explained the rules too. I suggest reading through the Firebase documentation for all the details :p

  • @user-pf6th7oo5m
    @user-pf6th7oo5m Před 3 lety +3

    This tutorial is exactly what Im looking for!! Your clear explanation helps me a lot, thanks!!

  • @benrobinson-baber9997
    @benrobinson-baber9997 Před 2 lety

    I havnt even watched the video yet, but have been looking for this video for ages now and just know this is the one. Thank you soooooooo much!

  • @kalibcrone6963
    @kalibcrone6963 Před 2 lety +1

    Thank you for going into detail about the db rules, I had mine just slightly wrong and was helpful to see your example.

  • @fadifarah5991
    @fadifarah5991 Před 3 lety +10

    You're one of a kind. Thanks for the amazing tutorial. Helped a lot

  • @Tornadoally
    @Tornadoally Před 3 lety +8

    Thanks! Nice to see a video by you again 👌

  • @povilasca8306
    @povilasca8306 Před 3 lety +3

    Thank you very much. Will help a lot working on my project! Keep up the good work :)

  • @jay_chromosome7172
    @jay_chromosome7172 Před 3 lety +1

    Your a life saver man. THHHAAANNK YOUUUU!! I'll just join the discord sever just to thank you and show support and appreciation. I know it ain't much but that's all I can give. Thank you😎👊

  • @kaanapan1183
    @kaanapan1183 Před 3 lety +1

    Please make more of these dude and thanks for cutting out the bullshit and showing the cores. Im pleased that you know your audience is not someone who just has begun to programming. God I hate those ones. Noone would just jump into firebase with unity if they are complete beginner. You got a new subscriber.

    • @xzippyzachx
      @xzippyzachx  Před 3 lety +1

      Yes, I wanted to target medium to higher skilled programmers with these tutorials. Unfortunately beginners still try to follow it and struggle, but Firebase is more of an advanced topic so its on them if they do not have the basic skills. Welcome to my channel! :p

  • @Keshish4
    @Keshish4 Před 3 lety +2

    You're legend "SIR" Thank you! :)

  • @amateurinteractive1381
    @amateurinteractive1381 Před rokem +1

    Very helpful tutorial buddy! Thanks :)

  • @nguyenkhoa364
    @nguyenkhoa364 Před rokem +1

    Thank you, your tutorial really helps me a lot :D

  • @jasonwee7580
    @jasonwee7580 Před 3 lety +3

    Really good content, thanks! Better than Google's tutorial!

  • @waymanharris1284
    @waymanharris1284 Před 2 lety +1

    Great job, thanks for sharing!!

  • @gabmanong6948
    @gabmanong6948 Před 6 měsíci +1

    thank you so much you saved my research ❤

  • @MontAureal
    @MontAureal Před 10 měsíci +1

    thanks for the video. You help me a lot !!! success in your work♥

  • @plaidev
    @plaidev Před 3 lety +6

    LETS GOO 🔥🔥🔥👍👍

  • @ahmetinanoglu
    @ahmetinanoglu Před 3 lety +1

    Very nice video. It is very helpful

  • @randomdotrange9528
    @randomdotrange9528 Před 2 lety +1

    thank you man , just bless you!

  • @sjb8178
    @sjb8178 Před 7 měsíci +1

    best tutorial. u got my heart boii

  • @jackpottt
    @jackpottt Před 2 lety +1

    Great tutorial :) thank you

    • @xzippyzachx
      @xzippyzachx  Před 2 lety +1

      Glad it was helpful!

    • @jackpottt
      @jackpottt Před 2 lety

      @@xzippyzachx It s helpful and i think it s the easiest tutorial I ever saw , i did everything here and working great :) Is it a good idea to add an array type data to database for purchase in items for iOS and android ? What do you think ?

  • @esrivera2228
    @esrivera2228 Před 2 lety +1

    NICEEEE TUTORIAL , THANKSS

  • @ppikachu1055
    @ppikachu1055 Před 3 lety +1

    Thank you so much ❤️

  • @majeddev
    @majeddev Před 3 lety +2

    Hey man, thanks so much, do you have any suggestions on how I can make a last week leaderboard kind of thing!

  • @noumanmobstudios7167
    @noumanmobstudios7167 Před 2 lety +1

    Awesome Work Buddy...!!
    You deserve more SUBSCRIBERS lol. ;)

    • @xzippyzachx
      @xzippyzachx  Před 2 lety +1

      Thanks! :p

    • @noumanmobstudios7167
      @noumanmobstudios7167 Před 2 lety +1

      @@xzippyzachx One thing i have to ask...!!
      What is Score Element?

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      @@noumanmobstudios7167 Its the elements that appear in the scoreboard. Look at the completed example project if you are unsure how it works

  • @spotthedifferencechannel
    @spotthedifferencechannel Před 3 lety +2

    Really nice way.. I am waiting fb and google auth with realtime database... If you have time

    • @xzippyzachx
      @xzippyzachx  Před 3 lety +1

      There are only a few things that you need to do differently for Facebook or Google. Have a read through the Firebase docs.

  • @realamp07
    @realamp07 Před 2 lety +1

    It was so nice, I hope you can make tutorial for save and load data in unity from firebase storage to.

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      I haven't used the firebase storage yet so maybe if I ever use it I will

    • @realamp07
      @realamp07 Před 2 lety

      @@xzippyzachx I want a ask something, what must I do if I want to put the input form for score data in other scene? And load it in other project? Coz I want to make application for admin for input a data and load the data in my main application.

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      @@realamp07 That gets more complicated. Feel free to ask on my discord server if you want my suggestions

  • @alexandreeiiiiiii
    @alexandreeiiiiiii Před 3 lety +1

    Great tutorial! I just would like something as clear as that on how to authenticate with google and facebook as well

    • @xzippyzachx
      @xzippyzachx  Před 3 lety

      Yeah, I am sorry I haven't done google or Facebook authentication. Reading the Firebase docs is probably your only option. Even though they aren't as clear. If you do get it working let me know on my Discord server so I can help people in the future. :p

  • @kitty_ovo
    @kitty_ovo Před 3 lety +1

    gooood jooob man

  • @andresnarvaez3799
    @andresnarvaez3799 Před 2 lety +1

    Great tut, I was digging into "updating the values" without replacing it, like it would be a more efficient way to just do point add to "kills" kills++
    ¿is there any way to do that over here?

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      Its a database call so usually you can only directly set values

  • @caligis
    @caligis Před 2 lety +1

    Really great tutorial! I got it working great. Now I want to adapt the tutorial to my own project which works across different scenes; do I need to initialize firebase and auth and things after this section?

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      Glad it helped! Making Firebase work across multiple scenes would require the Firebase Manager to persist between scenes. One way you can do this is by using DontDestroyOnLoad.

    • @caligis
      @caligis Před 2 lety

      @@xzippyzachx I have another quick question. How common is it to have different UIs in the same scene? I feel like it's natural to have the profile page in another scene but keep getting stuck while trying to make it work across multiple scenes. Doesn't it get messy having all the "management" stuff in one single scene? I have this strange NullReferenceException in my text fields even though they are linked up in the inspector and declared in the code

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      @@caligis Well when you switch scenes those text references will be lost since they are not in the second scene. Its common to have UI screens all in the same scene. You just need to make a UIManager that switches between the UI screens.

  • @elvinbayramov7389
    @elvinbayramov7389 Před 3 lety +1

    Thanks. Cool tutorial. And how to make automatic authorization? In many mobile games, you don't have to type the same every time

    • @xzippyzachx
      @xzippyzachx  Před 3 lety +1

      Firebase actually automatically authorizes if you have logged in before. So what you need to do is check if the user is not null and then skip the login screen. Ask on my Discord server if you want help :p

  • @pierrot457
    @pierrot457 Před 2 lety +1

    Very nice tutorial ! Thanks a lot. I have one question, if you have a huge number of players (like one million for example), each call for updating the leaderboard would be very costly since you retrieve all the players from the database and you sort them. How can you optimize this ?

    • @xzippyzachx
      @xzippyzachx  Před 2 lety +1

      You could only get the highest X amount of users score. Read through the Firebase docs if you want to learn more about how you can do this.

    • @pierrot457
      @pierrot457 Před 2 lety

      @@xzippyzachx indeed i know this functionality but if the rank of the player is 1000 and you get only the first 100 top players, you cannot get the rank of the player.

  • @zainkashif3269
    @zainkashif3269 Před 3 lety +1

    Thank u brother very nice tutorial, would u please tell me how to change the type and name of input fields in the scoreboard UI and and also in database as well...

    • @xzippyzachx
      @xzippyzachx  Před 3 lety

      Join my Discord server if you want help

  • @samsara2024
    @samsara2024 Před 3 lety +1

    Are you planning to make another tutorial with the FireBase storage? Thanks!

    • @xzippyzachx
      @xzippyzachx  Před 3 lety

      Maybe if I happen to use it. I haven't yet so I cant make a tutorial about it yet. :p

  • @trebeltom1234
    @trebeltom1234 Před 3 lety +1

    This is great thanks! Have you implemented any client prediction/ server reconciliation or lag compensation on top of Tom’s networking architecture?

    • @xzippyzachx
      @xzippyzachx  Před 3 lety +1

      Not yet! I only have interpolation right now

    • @trebeltom1234
      @trebeltom1234 Před 3 lety

      Excellent stuff regardless, inspiring!

  • @falco830
    @falco830 Před 3 lety +1

    So I'm trying to create a 2v2 - 4v4 online multiplayer game and am not sure which database technology I should be using for this. So I see Firebase could be a potential candidate for what I'm trying to do?

  • @pevinderkaur4477
    @pevinderkaur4477 Před 3 lety +2

    hi what if i do it one different scene, so i have 2 scripts one is for the authentication and another for realtime , how can i push the data from authentication to realtime script?

    • @xzippyzachx
      @xzippyzachx  Před 3 lety

      You can move an object with data attached to it using the dontdestroyonload function

  • @charlesferry9465
    @charlesferry9465 Před rokem +1

    life saver!!!!!!!!!!!!!!!

  • @turbulence101games5
    @turbulence101games5 Před 2 lety +1

    Thanks!

  • @SthuartyGonzaga
    @SthuartyGonzaga Před 3 lety +1

    you are the best! haha

  • @aadityarajkarki7610
    @aadityarajkarki7610 Před 5 měsíci +1

    Hello very nice tutorial but I want to ask to access kill death we need userid right? so when I google login I will only get my own userid so I can only access my stat. I don't have another player ID so how do I access every player stats without id.

    • @xzippyzachx
      @xzippyzachx  Před 5 měsíci

      I show in the tutorial how you can list out all the players data in a leaderboard. Is that not what you are looking for? If you want to get the stats/data of one player, yes you would need the specific UID of the other player. Not sure what type of game you are making but your systems would need to know the UID of the other player. If you have more questions I suggest asking on my Discord server.

  • @Mr2winners
    @Mr2winners Před 3 lety +1

    yes this was usefull

  • @YaBoiNeon
    @YaBoiNeon Před rokem +1

    Hey, what did you put in the Back button OnClick function? I either missed it or you didn't go over it in the video.
    P.S. Thank you for the tutorial, very well made.

    • @xzippyzachx
      @xzippyzachx  Před rokem

      Depending on which back button you are talking about it should be assigned one of the functions in the UIManager script. Either the LoginScreen() or UserDataScreen() function.

  • @Spiderfish7
    @Spiderfish7 Před rokem +1

    I need help please. When I'm trying to reference my FirebaseDatabase, I get this error message: DatabaseException: Failed to get FirebaseDatabase instance: Specify DatabaseURL within FirebaseApp or from your GetInstance() call. What ist the problem here? I downloaded the json file and put it into unity.

    • @xzippyzachx
      @xzippyzachx  Před rokem

      Did you re-download the "google-services.json" file after you enabled the database in the Firebase console? I would try deleting and re-downloading it again. You can also ask for help on my Discord server.

  • @l0ne872
    @l0ne872 Před 3 lety +3

    Nice

  • @HardwareHari
    @HardwareHari Před 3 lety +1

    Thanks a lot....😊,....

    • @xzippyzachx
      @xzippyzachx  Před 3 lety +1

      Hope it helped!

    • @HardwareHari
      @HardwareHari Před 3 lety +1

      @@xzippyzachx sure bro, it will help me when I start creating a multi-player version for my game. My game is still in development as I just started learning unity and c#....

  • @TheUncutAngel
    @TheUncutAngel Před rokem +3

    You're amazing for this. 2 years later and the script still works. Very rare for a firebase tutorial! Very clean and understandable.
    hot tip, if you're trying to get the child object that is deeper than a level show in this video, change this:
    string usernameResult = childSnapshot.Child("username").Value.ToString();
    to this:
    string usernameResult = childSnapshot.Child("userInfo").Child("username").Value.ToString();

    • @xzippyzachx
      @xzippyzachx  Před rokem

      Yes, luckily most of what's shown in this video still works but things are starting to change in newer versions of the Firebase SDK that are starting to break things. Glad I could be helpful! :p

  • @SamuelWondersoul
    @SamuelWondersoul Před 3 lety +4

    Hello im always getting a mistake when trying to save data to the base on firebase , it says NullReferenceException: Object reference not set to an instance of an object

    • @xzippyzachx
      @xzippyzachx  Před 3 lety +3

      I helped Samuel over on my Discord server. The issue was that he needed to re-download the google-services.json file :p

    • @SamuelWondersoul
      @SamuelWondersoul Před 3 lety +2

      @@xzippyzachx thank you so much, it worked perfectly!

  • @louismastbooms5048
    @louismastbooms5048 Před 3 lety +1

    nice one

  • @nurfartinah4534
    @nurfartinah4534 Před 3 lety +1

    Im new to the unity, how can i get the score element in prefabs ? What should i do to have that element ?

    • @xzippyzachx
      @xzippyzachx  Před 3 lety

      You can look at the complete example project to see how its done. Or you can join my Discord server to ask for help.

  • @ehsanhadipoor7161
    @ehsanhadipoor7161 Před 2 lety +1

    Hi my brothers
    Button save not working
    Save not working?why

  • @publicalias8172
    @publicalias8172 Před 2 lety +1

    Would you consider doing a tutorial on custom authentication, specifically steamworks SteamID > email/password? I feel like that's a huge thing for *any* game running on steam (there are many as you know)- to not have to disturb the flow with a email/password login when you already own it on steam..

    • @xzippyzachx
      @xzippyzachx  Před 2 lety +1

      Yeah I would but I haven't used steamworks authentication myself yet. I don't specifically do research on topics I haven't used before in my own project just to make tutorials. But I do plan on using steam authentication in my own project some day. So yeah I may make a tutorial some day but that most likely wont help you since you are looking for a tutorial on it right now :|

  • @KianSky2023
    @KianSky2023 Před rokem +1

    please help me how do I delete data from firebase using button or something script in unity?

    • @xzippyzachx
      @xzippyzachx  Před rokem

      You should be able to look that up on the Firebase docs, but you can also ask for help on my Discord server

  • @samsara2024
    @samsara2024 Před 3 lety +2

    Just one silly question. How could u use the firebase realtime as a server? Imagin 2 players playing in different computers each one logged with his own user. How can you do to access the data of other user?

    • @xzippyzachx
      @xzippyzachx  Před 3 lety

      You can set up your database any way you like. In theory you could make a multiplayer game with it but it wouldn't be the fastest. Maybe a turn based game or non fast pace game it would work for.

    • @abudriaz9678
      @abudriaz9678 Před 2 lety

      @@xzippyzachx please make tutorial on turn base game with firebase

  • @hshshshehd4
    @hshshshehd4 Před 3 lety +1

    Hey, again. So i wanted to know is there a possible way to prevent the player from typing a inapropriate username for example?

    • @xzippyzachx
      @xzippyzachx  Před 3 lety +1

      You could use the Firebase database to hold a bank of flagged names. Then check there username input against it. If its in the bank of flagged names then prevent them from using it. Thanks my idea at least.

  • @renji16
    @renji16 Před rokem +1

    Can i know i dont have error, scrollview content have scoreelement depends on my data. But my problem is in not visible.

    • @xzippyzachx
      @xzippyzachx  Před rokem

      Your UI must not be setup correctly. Like I said before you can look at my complete project on GitHub to see how I did the UI or you can join my Discord server and ask for help there.

  • @Helix512
    @Helix512 Před 3 lety +3

    what a coincidence i was just working on this lol

  • @jordivanderpoten5226
    @jordivanderpoten5226 Před 3 lety +1

    Can you make tutorial for Android like how to adjust this project to android with for example only horizontal screen lock, screen size adjustment etc?
    Not using the unity app on the play store but the real APK

    • @xzippyzachx
      @xzippyzachx  Před 3 lety

      I don't think I will make a tutorial on that because its not related to Firebase. I am sure there are other tutorials on CZcams though.

  • @Brainyplanet
    @Brainyplanet Před 3 lety +1

    Can I import it as custom package like we do it previously, cuz I can't able to find My registries even after adding scop. Can you tell me why I can't find My Registries Option?

    • @xzippyzachx
      @xzippyzachx  Před 3 lety

      Are you using unity 2020.2? I know there is a bug where "My Registries" does not appear in the drop down options. You will need to manually add the packages to the manifest.json file. Please join my discord server and I can help you further there.

    • @Brainyplanet
      @Brainyplanet Před 3 lety

      @@xzippyzachx yes my version is 2020.2, thanks for the information. I hope unity will fix this issue soon. Imma join your discord server..

    • @Brainyplanet
      @Brainyplanet Před 3 lety

      @@xzippyzachx but can I import package like previous method thru sdk zip?

  • @user-mz1sx2ye6c
    @user-mz1sx2ye6c Před 5 měsíci +1

    In your description in Google packages registry URL it says (no longer works) what do you mean by that?

    • @xzippyzachx
      @xzippyzachx  Před 5 měsíci

      Read the pinned comment on the video. "Unity package manager is no longer used to install the Firebase SDK". So just ignore that URL

    • @user-mz1sx2ye6c
      @user-mz1sx2ye6c Před 5 měsíci +1

      @@xzippyzachx ow I didn't notice the pinned comment thanks for the info 🙂

  • @lachlansantos2868
    @lachlansantos2868 Před 2 lety +1

    the google package registry url no longer works, would you know where i can find the new one?

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      Yeah it is no longer used to install the Firebase packages. Read the pinned comment on this video

  • @GoblinOnAStick
    @GoblinOnAStick Před 2 lety +2

    Okay, I have tried everything to add the Firebase packages to my projects. The way you did it in the previous video, this video the and pinned comment in this video. The packages refuse to show up in my package manager and I get the following errors:
    Assembly 'Assets/ExternalDependencyManager/Editor/1.2.167/Google.IOSResolver.dll' will not be loaded due to errors:
    Unable to resolve reference 'UnityEditor.iOS.Extensions.Xcode'. Is the assembly missing or incompatible with the current platform?
    Reference validation can be disabled in the Plugin Inspector.
    AND
    Assembly 'Assets/Firebase/Editor/Firebase.Editor.dll' will not be loaded due to errors:
    Unable to resolve reference 'UnityEditor.iOS.Extensions.Xcode'. Is the assembly missing or incompatible with the current platform?
    Reference validation can be disabled in the Plugin Inspector.
    The Google Services.json is in my Assets folder. I tried switching platforms. I tried using the same version of Unity as you do and it still doesn't work.
    Any idea what I'm doing wrong here?

    • @xzippyzachx
      @xzippyzachx  Před 2 lety +1

      Even if you aren't building for ios it seems to want the build module installed. If you install the ios build module for Unity those errors should no longer appear.

    • @GoblinOnAStick
      @GoblinOnAStick Před 2 lety

      @@xzippyzachx I tried it again, went through it slowly. I copied the files to my project directory and installed them with package manager. It works now, thanks for the reply. Keep up the good work! 😁

  • @yanicool1
    @yanicool1 Před 2 lety +1

    Can you explain what is score element or how u make it? I'm trying to make my own ui and i cannot figure it out thanksss!

    • @xzippyzachx
      @xzippyzachx  Před 2 lety +1

      I suggest downloading the complete Unity example project to see how I did all the UI

  • @wolker213
    @wolker213 Před 2 lety +1

    But how can i edit variables of each registrated user from Firebase site? How can i do this?

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      You can edit any of their data from the database module in the Firebase console.

  • @a_b_n_alhasan9867
    @a_b_n_alhasan9867 Před 3 lety +1

    Thank you, I am facing a problem with the Firebase sdk add-on, knowing that it is using the 2020 version of Unity, I cannot add it from the package manager list, and I put everything as I explained, but my register does not appear and thank you

    • @xzippyzachx
      @xzippyzachx  Před 3 lety

      Firebase no longer supports the package manager and cannot be installed using it. Read the pinned comment on this video for new instructions how to install it another way.

    • @utkudagli
      @utkudagli Před 3 lety

      @@xzippyzachx Hello, there is no pinned comment on this video can you help me with it?

    • @xzippyzachx
      @xzippyzachx  Před 3 lety +1

      @@utkudagliThe pinned comment got removed some how. It is now re-pinned

  • @devilgamingforce1090
    @devilgamingforce1090 Před rokem +1

    authentication is not working when I build for an Android or windows x86
    cant find out the problem

    • @xzippyzachx
      @xzippyzachx  Před rokem +1

      I know it doesn't work on windows 32 bit, but it should be working for Android builds.

  • @Feiee
    @Feiee Před 3 lety +2

    05:35 doesnt work for unity 2020.2.1f1. the "My Registries" does not appear. is ther any alternative methods? :/

    • @xzippyzachx
      @xzippyzachx  Před 3 lety

      Yes, this is a bug with unity. You can manually add the Packages via the "manifest.json" file.
      "com.google.external-dependency-manager": "1.2.163",
      "com.google.firebase.app": "7.0.1",
      "com.google.firebase.auth": "7.0.1",
      "com.google.firebase.database": "7.0.1",
      Add these to the dependencies list in the "manifest.json" file. They will then appear in the package manager.

    • @Feiee
      @Feiee Před 3 lety +1

      Thank you!

    • @Nikdeckreviews
      @Nikdeckreviews Před 3 lety

      @@xzippyzachx after doing this its giving me this error:
      An error occurred while resolving packages:
      Project has invalid dependencies:
      com.google.external-dependency-manager: Package [com.google.external-dependency-manager@1.2.163] cannot be found
      com.google.firebase.app: Package [com.google.firebase.app@7.0.1] cannot be found
      com.google.firebase.auth: Package [com.google.firebase.auth@7.0.1] cannot be found
      com.google.firebase.database: Package [com.google.firebase.database@7.0.1] cannot be found
      A re-import of the project may be required to fix the issue or a manual modification of C:/Users/Nikhil/Unity Games/New Unity Project (2)/Packages/manifest.json file.

  • @thatOne873
    @thatOne873 Před 27 dny +1

    hello, from now it will be better to use firestore or stay with realtime database?

    • @xzippyzachx
      @xzippyzachx  Před 27 dny

      It kind of depends on your use case, I would read the descriptions on the Firebase pages to get an idea of their differences.

  • @ikee_2947
    @ikee_2947 Před 3 lety +1

    Hi Hope someone can help me. On my unity editor the firebase works but when i tried to build and run the apk on my physical android device it does not work and there are no data shows from the firebase. (I am using 2021 version of Unity)

    • @xzippyzachx
      @xzippyzachx  Před 3 lety

      They got assistance on my Discord server. Feel free to join and ask for help if you have a similar issue.

    • @JovanJamaica
      @JovanJamaica Před 2 lety

      Try changing arm64 , that did the trick for me

  • @MavsFit
    @MavsFit Před 2 lety +1

    I have this error, any help, please ? (great video!!)
    Assets\Scripts\FirebaseManager.cs(400,48): error CS0246: The type or namespace name 'scoreElement' could not be found (are you missing a using directive or an assembly reference?)

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      It looks like you haven't setup the scoreElement script and prefab correctly. I recommend asking for help on my Discord server if you have further issues.

    • @xX...I...Xx.
      @xX...I...Xx. Před 2 lety +1

      @@xzippyzachx Hello, I wanted to know if the registered user has a separate information table? different from any other registered user. Thanks

  • @justinecoronel4661
    @justinecoronel4661 Před 3 lety +2

    Does this database works on mobile app ? i have some problems once i export it on apk the database doesn't work anymore

    • @xzippyzachx
      @xzippyzachx  Před 3 lety

      Yes Firebase is actually build for mobile. Did you try what I suggested in the pinned comment on this video?

    • @ikee_2947
      @ikee_2947 Před 3 lety

      Hi Hope someone can help me. On my unity editor the firebase works but when i tried to build and run the apk on my physical android device it does not work and there are no data shows from the firebase. (I am using 2021 version of unity)

  • @hichan2870
    @hichan2870 Před 2 lety +1

    I saw the scripts and others but I don't understand how you made the scoreboard and score element I wish you would show them too

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      I suggest downloading and looking at the completed project from my GitHub. You can then see how all the UI was setup. Sorry I did not include this in the video because I was mainly focusing on the Firebase aspect rather than the UI.

  • @rabeamonzer5436
    @rabeamonzer5436 Před 3 lety +1

    Thank you so much for this great content. Please, could you give me any hints on how I can make a search window to search for a user by name. Thank you.

    • @xzippyzachx
      @xzippyzachx  Před 3 lety +1

      Well you are going to have to search through the scoreboardElement 's by the username. If you mean without the scoreboard then you are going to have to search through the list of user data. Thanks!

    • @rabeamonzer5436
      @rabeamonzer5436 Před 3 lety

      @@xzippyzachx thank you

    • @rabeamonzer5436
      @rabeamonzer5436 Před 3 lety +1

      ​@@xzippyzachx Please, could you help me with how to filter the scoreboard elements? For example, if I have player's classes: archers, warriors & Magicians and I want the user to filter the scoreboards as he wants, how can this be done between unity and firebase in your tutorial. Thank you.

    • @xzippyzachx
      @xzippyzachx  Před 3 lety

      @@rabeamonzer5436 Help can be gotten on my Discord server

  • @ayurisqi3481
    @ayurisqi3481 Před 3 lety +1

    Hello sir, can you please show me how to create a scoreboard view to show data from firebase? thanks

    • @xzippyzachx
      @xzippyzachx  Před 3 lety +1

      Is that not what I did in this tutorial?

  • @marvicbautista7080
    @marvicbautista7080 Před 2 lety +1

    HI what could it be the problem if when i play the game it says that the line where my vartask is written says that Object reference not set to an instance of an object

    • @marvicbautista7080
      @marvicbautista7080 Před 2 lety

      im trying to access the scores in different scene

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      Using multiple scenes would be an issue. The code in this tutorial does not work across multiple scenes on its own.

  • @ehsanhadipoor1102
    @ehsanhadipoor1102 Před 2 lety +1

    Hello brother. In the save button section, it does not work and no information is saved on Firebase and Scoopboard does not work.

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      Join and ask for help on my Discord server.

  • @dranbenedicto2338
    @dranbenedicto2338 Před 3 lety +1

    Can you do a realtime online multiplayer tutorial? like multiple players moving or like taking turns?

    • @xzippyzachx
      @xzippyzachx  Před 3 lety +1

      I have a bunch linked in the description of my first multiplayer game update video. I would suggest watching them

    • @abudriaz9678
      @abudriaz9678 Před 2 lety

      yes please there is literaly no material on internet on how to make multiplayer game with firebase please make an indepth video on it

  • @charlenejoyconcha3502
    @charlenejoyconcha3502 Před 3 lety +1

    Is there no problem when im using an android mobile game application?

    • @xzippyzachx
      @xzippyzachx  Před 3 lety

      Firebase was built for Mobile so it will work yes

  • @cubingle6843
    @cubingle6843 Před 3 lety +1

    nice

  • @bebogt5922
    @bebogt5922 Před 3 lety +1

    Please help How can I make login email work from one device only if player logs in then the email cant be used on any other device please help

  • @aviationgeek2624
    @aviationgeek2624 Před rokem +1

    Wait what do you mean it starts from the previous? the previous was the auth but how did you combine both

    • @xzippyzachx
      @xzippyzachx  Před rokem

      You need to be authenticated before accessing the database. If you aren't authenticated then the database wouldn't know which user to save the user data under.

    • @aviationgeek2624
      @aviationgeek2624 Před rokem

      @@xzippyzachx okay thanks got it 👍

  • @myanimation5631
    @myanimation5631 Před 2 lety +1

    but when we sign in and then close the game then open why we have to another time sign in?

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      Yes, there are some extra steps you have to do to auto re-login. You can ask on my Discord server if you want

  • @rodneyompoc4457
    @rodneyompoc4457 Před 3 lety +1

    Hi sir zippy, great tutorial!!
    but i got a problem in updateusernamedatabase(). in unity it says "object reference not set to instance of an object" even thou i already assign it in firebasemanager. how should i fix this sir? thanks

    • @xzippyzachx
      @xzippyzachx  Před 3 lety

      I believe you asked for help in the Discord server? Right?

    • @Nikdeckreviews
      @Nikdeckreviews Před 3 lety

      @@xzippyzachx I am also havin same issue please tell the solution?

    • @xzippyzachx
      @xzippyzachx  Před 3 lety +1

      @@Nikdeckreviews Join the discord and explain your issue in the help channel. Thanks :p

    • @RumOwnesT
      @RumOwnesT Před 2 lety

      @@Nikdeckreviews did you find solution ?

  • @davescellphone5376
    @davescellphone5376 Před 3 lety +1

    Watched this and several other videos a few times now but I'm missing it I think. How are you setting your FirebaseDatabase URL?

    • @davescellphone5376
      @davescellphone5376 Před 3 lety +1

      Nevermind but a good note. I downloaded an updated json file and that fixed it right up.

    • @xzippyzachx
      @xzippyzachx  Před 3 lety +1

      Yes the google-services.json file is what links your Unity project to the Firebase console project. It includes the FirebaseDatabase URL

    • @davescellphone5376
      @davescellphone5376 Před 3 lety +1

      @@xzippyzachx Yup, but if you download it before creating the database, it can't have the URL. Total boneheaded move. Thanks for the great video btw!

    • @xzippyzachx
      @xzippyzachx  Před 3 lety +1

      @@davescellphone5376 I see what you mean now. I didn't actually know that thanks! :p

  • @giftcash9395
    @giftcash9395 Před 3 lety +1

    How can I work Unique Usernames using Firebase database

    • @xzippyzachx
      @xzippyzachx  Před 3 lety

      What I did was keep track of all the created usernames in a list in the database. When a user tries to make an account I first check if it already is in that database list before letting them make an account with it.

  • @renji16
    @renji16 Před rokem

    HI can i ask you something?, when i build the application, firebase dont work on my mobile... it didnt crash but did also nothing... its perfectly fine in my unity editor.. google-service-desktop.json seems also connected to my project and can read, and while google-service.json unity didnt read.

    • @xzippyzachx
      @xzippyzachx  Před rokem

      Since the issue is only happening in the mobile build I suggest finding a mobile console on the Unity asset store so you can see if any errors are being thrown in the actual android build of your game. There are a few free mobile consoles on the Unity asset store. Join my Discord and ask for further help there.

    • @renji16
      @renji16 Před rokem

      @@xzippyzachx how can i join on your discord?

    • @renji16
      @renji16 Před rokem

      @@xzippyzachx what is your discord?

  • @abudriaz9678
    @abudriaz9678 Před 2 lety +1

    can i make multiplayer game in unity with firebase with out using firebase cloud functions will i have to use listners or what please someone guide me

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      Yes you could make a peer to peer slow paced multiplayer game with Firebase in Unity. I am not planning on making one but I'm not sure if there are any good guides out there.

    • @abudriaz9678
      @abudriaz9678 Před 2 lety +1

      @@xzippyzachx thank you for the reply will the turn base game also be slow with it

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      @@abudriaz9678 Yeah a turn based game is a slow paced game so it would work

  • @misal-isahabe5281
    @misal-isahabe5281 Před 3 lety +1

    Hi, I have a issue about accesing client in photon. How can I access to a client in server with its nickname or ID? Thanks now.

    • @xzippyzachx
      @xzippyzachx  Před 3 lety +1

      I haven't used photon so I am not really sure. You can join my discord and maybe someone can help you.

    • @misal-isahabe5281
      @misal-isahabe5281 Před 3 lety

      @@xzippyzachx Thanks.What name is your discord

    • @xzippyzachx
      @xzippyzachx  Před 3 lety

      @@misal-isahabe5281 Its linked in the description

  • @nachohotdawg5634
    @nachohotdawg5634 Před 3 lety +2

    Can you please make a video about facebook and google login in unity (by firebase) , Im so in need, and i searched the youtube n couldnt find a good one.

    • @xzippyzachx
      @xzippyzachx  Před 3 lety +1

      Yeah there isn't many resources out there. I unfortunately don't have time at the moment to figure it out and make a tutorial. Sorry :(

    • @nachohotdawg5634
      @nachohotdawg5634 Před 3 lety +2

      @@xzippyzachx ;(( I wish u the best man!
      I’ve another question but I don’t know if the answer needs long tutorial 😅
      Based on the lovely tutorial u gave, can I make auto login every time I open the app? 🥺🥺

    • @xzippyzachx
      @xzippyzachx  Před 3 lety +1

      @@nachohotdawg5634 Auto login actually already happens. You just need to check if the auth.currentUser == null and if it isn't then you can skip the login screen because Firebase automatically saves your last authentication. Join my discord for more help

  • @johnlopez1271
    @johnlopez1271 Před 2 lety +1

    Hey @xzippyzackx Thanks for the tutorial. For some reason the the script stop on line of confirmLoginText. The waitforSecods does not execute. Any idea? Thanks again.

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      Thanks! Your best option would be to ask for help on my Discord server.

  • @azeezomplayz
    @azeezomplayz Před 3 lety

    Can you help me Save data and Scoreboard isnt working I used the finished Scene and stuff did i do something wrong?

    • @azeezomplayz
      @azeezomplayz Před 3 lety

      Also it comes up with permission denied whats going on?

    • @xzippyzachx
      @xzippyzachx  Před 3 lety

      @@azeezomplayz Join the discord to ask for help :p

  • @marvicbautista7080
    @marvicbautista7080 Před 2 lety +1

    hello everyone can someone pls help, when im trying to load data it always show { key = kills, value = }. the code cant detect the value

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      I suggest asking for help on my Discord server

  • @calvinms7503
    @calvinms7503 Před 11 měsíci

    How can you prevent the data being tempered from the user side and get uploaded to the server?

    • @xzippyzachx
      @xzippyzachx  Před 10 měsíci

      You would need to have a proper backend server that does the data calls to ensure its not tampered with. Using Firebase functions is another option if you want to go serverless.

  • @dream_catcher7725
    @dream_catcher7725 Před rokem +1

    is there a way to make a list of items for the user ? and save/load it to firebase database?

    • @xzippyzachx
      @xzippyzachx  Před rokem +1

      Yes, you should look into saving lists of data in the firebase database. Here is the documentation firebase.google.com/docs/database/unity/save-data#append_to_a_list_of_data

    • @dream_catcher7725
      @dream_catcher7725 Před rokem

      @@xzippyzachx thank you , still it uses dictionary in the example [im still new to firebase btw] i followed your tutorial i found out that every user have its values(strings) what i was trying to do is to create an element to a list in each user and each element have its childrens[values strings] like inventory for example is there any possibility t use list() instead of using dectionary and if there is a way could you give a hint based on your example [i couldnt find any examples of firebase inventory integration exapmple in the internet] thank you so mush !!

  • @ProGamingg
    @ProGamingg Před 3 lety +1

    Hi i have a question, i want to pass the data from the logged in user over to another scene. But i get errors when i do that. Can you help me with that?

    • @xzippyzachx
      @xzippyzachx  Před 3 lety

      I have answered this on my discord channel. Others feel free to join :p

  • @hshshshehd4
    @hshshshehd4 Před 3 lety +1

    hey so i am having trouble exporting my game
    if i log in with my account and click log in it does nothing

    • @xzippyzachx
      @xzippyzachx  Před 3 lety

      Are you doing an android build? If so, try what I mentioned in the pinned comment. Otherwise you can join my discord server and ask for help.

    • @hshshshehd4
      @hshshshehd4 Před 3 lety +3

      @@xzippyzachx no thank you for replying so what i did wrong is that i had a x86 build and not a x86_64 build i am sorry to waste your time. The tutorial was amazing :)

    • @xzippyzachx
      @xzippyzachx  Před 3 lety

      @@hshshshehd4 Ah yes it only works if the build is 64 bit. No problem! :p

  • @duckskeppy4432
    @duckskeppy4432 Před 3 lety +1

    Can I load all the data on other scene?

    • @xzippyzachx
      @xzippyzachx  Před 3 lety

      You should use DoNotDestroyOnLoad to keep the Firebase manager persistent between scenes

  • @rudyramadhana4127
    @rudyramadhana4127 Před 11 měsíci +1

    every time I call the save data method, unity crashes... help :(
    Also, there is no "My Registry" on my unity, I am using 2021.3.16f1
    I tried redownloading google-services json, still same, crashes when calling the save data method

    • @xzippyzachx
      @xzippyzachx  Před 11 měsíci

      This issue seems to be happening to people recently. Feel free to discuss your troubleshooting/findings on my Discord server.
      In response to your "My Registry" comment. You should not be using the Unity package manager to install the Firebase SDK anymore. Make sure to follow the new install instructions in the pinned comment.

    • @rudyramadhana4127
      @rudyramadhana4127 Před 11 měsíci +1

      @@xzippyzachx Thanks! I wasnt using package manager to install firebase SDK though