Unity User Data & Scoreboard Tutorial - Firebase Realtime Database

  Рет қаралды 100,237

xzippyzachx

xzippyzachx

Күн бұрын

Пікірлер: 368
@xzippyzachx
@xzippyzachx 3 жыл бұрын
*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 3 жыл бұрын
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
@墨仔舊頻道
@墨仔舊頻道 3 жыл бұрын
How to save data without the button, please I need your help!!!
@noumanmobstudios7167
@noumanmobstudios7167 3 жыл бұрын
@@墨仔舊頻道 Just call the function where you have to save data for example : savedata(); call this function instead of pressing on button
@墨仔舊頻道
@墨仔舊頻道 3 жыл бұрын
@@noumanmobstudios7167 thanks, my school project already end
@marvicbautista7080
@marvicbautista7080 2 жыл бұрын
HI what if i dont have .net 4 on my unity?
@bitesupper8691
@bitesupper8691 3 жыл бұрын
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 3 жыл бұрын
Glad it helped! I barley explained the rules too. I suggest reading through the Firebase documentation for all the details :p
@Tornadoally
@Tornadoally 3 жыл бұрын
Thanks! Nice to see a video by you again 👌
@xzippyzachx
@xzippyzachx 3 жыл бұрын
More to come! :p
@kalibcrone6963
@kalibcrone6963 2 жыл бұрын
Thank you for going into detail about the db rules, I had mine just slightly wrong and was helpful to see your example.
@xzippyzachx
@xzippyzachx 2 жыл бұрын
Glad it helped!
@fadifarah5991
@fadifarah5991 3 жыл бұрын
You're one of a kind. Thanks for the amazing tutorial. Helped a lot
@xzippyzachx
@xzippyzachx 3 жыл бұрын
Glad I could help!
@TheUncutAngel
@TheUncutAngel Жыл бұрын
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 Жыл бұрын
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
@benrobinson-baber9997
@benrobinson-baber9997 2 жыл бұрын
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!
@xzippyzachx
@xzippyzachx 2 жыл бұрын
You're very welcome! lol :p
@한민서-q8h
@한민서-q8h 2 ай бұрын
Thanks you for making a great tutorial! It really helped me a lot.
@xzippyzachx
@xzippyzachx 2 ай бұрын
Glad I could help!
@Yトーマ
@Yトーマ 3 жыл бұрын
This tutorial is exactly what Im looking for!! Your clear explanation helps me a lot, thanks!!
@xzippyzachx
@xzippyzachx 3 жыл бұрын
Glad it was helpful! :p
@alonsogarrote8898
@alonsogarrote8898 23 күн бұрын
Interesting video, helpful. What would you advice for mobile+desktop?
@xzippyzachx
@xzippyzachx 23 күн бұрын
Firebase fully supports mobile and mostly supports desktop if thats what your asking
@kaanapan1183
@kaanapan1183 3 жыл бұрын
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 3 жыл бұрын
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
@povilasca8306
@povilasca8306 3 жыл бұрын
Thank you very much. Will help a lot working on my project! Keep up the good work :)
@xzippyzachx
@xzippyzachx 3 жыл бұрын
Glad it helped! :p
@spotthedifferencechannel
@spotthedifferencechannel 3 жыл бұрын
Really nice way.. I am waiting fb and google auth with realtime database... If you have time
@xzippyzachx
@xzippyzachx 3 жыл бұрын
There are only a few things that you need to do differently for Facebook or Google. Have a read through the Firebase docs.
@Spiderfish7
@Spiderfish7 Жыл бұрын
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 Жыл бұрын
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.
@jay_chromosome7172
@jay_chromosome7172 3 жыл бұрын
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😎👊
@xzippyzachx
@xzippyzachx 3 жыл бұрын
Thanks! :p
@renji16
@renji16 2 жыл бұрын
Can i know i dont have error, scrollview content have scoreelement depends on my data. But my problem is in not visible.
@xzippyzachx
@xzippyzachx 2 жыл бұрын
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.
@GoblinOnAStick
@GoblinOnAStick 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 2 жыл бұрын
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 2 жыл бұрын
@@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! 😁
@aadityarajkarki7610
@aadityarajkarki7610 9 ай бұрын
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 9 ай бұрын
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.
@Wj3399
@Wj3399 3 жыл бұрын
Really good content, thanks! Better than Google's tutorial!
@xzippyzachx
@xzippyzachx 3 жыл бұрын
Glad it was helpful!
@thatOne873
@thatOne873 5 ай бұрын
hello, from now it will be better to use firestore or stay with realtime database?
@xzippyzachx
@xzippyzachx 5 ай бұрын
It kind of depends on your use case, I would read the descriptions on the Firebase pages to get an idea of their differences.
@caligis
@caligis 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
@@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 2 жыл бұрын
@@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.
@MontAureal
@MontAureal Жыл бұрын
thanks for the video. You help me a lot !!! success in your work♥
@xzippyzachx
@xzippyzachx Жыл бұрын
Glad it helped!
@YaBoiNeon
@YaBoiNeon 2 жыл бұрын
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 2 жыл бұрын
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.
@KianSky2023
@KianSky2023 Жыл бұрын
please help me how do I delete data from firebase using button or something script in unity?
@xzippyzachx
@xzippyzachx Жыл бұрын
You should be able to look that up on the Firebase docs, but you can also ask for help on my Discord server
@gabmanong6948
@gabmanong6948 10 ай бұрын
thank you so much you saved my research ❤
@xzippyzachx
@xzippyzachx 10 ай бұрын
Glad I could help!
@SamuelWondersoul
@SamuelWondersoul 3 жыл бұрын
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 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 3 жыл бұрын
@@xzippyzachx thank you so much, it worked perfectly!
@samsaraAI2025
@samsaraAI2025 3 жыл бұрын
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 3 жыл бұрын
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 2 жыл бұрын
@@xzippyzachx please make tutorial on turn base game with firebase
@ehsanhadipoor7161
@ehsanhadipoor7161 2 жыл бұрын
Hi my brothers Button save not working Save not working?why
@ehsanhadipoor1102
@ehsanhadipoor1102 2 жыл бұрын
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 2 жыл бұрын
Join and ask for help on my Discord server.
@amateurinteractive1381
@amateurinteractive1381 Жыл бұрын
Very helpful tutorial buddy! Thanks :)
@xzippyzachx
@xzippyzachx Жыл бұрын
Glad it helped!
@falco830
@falco830 3 жыл бұрын
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?
@xzippyzachx
@xzippyzachx 3 жыл бұрын
Yes Firebase could work or Playfab
@nguyenkhoa364
@nguyenkhoa364 Жыл бұрын
Thank you, your tutorial really helps me a lot :D
@xzippyzachx
@xzippyzachx Жыл бұрын
Glad it helped!
@devilgamingforce1090
@devilgamingforce1090 2 жыл бұрын
authentication is not working when I build for an Android or windows x86 cant find out the problem
@xzippyzachx
@xzippyzachx 2 жыл бұрын
I know it doesn't work on windows 32 bit, but it should be working for Android builds.
@pevinderkaur4477
@pevinderkaur4477 3 жыл бұрын
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 3 жыл бұрын
You can move an object with data attached to it using the dontdestroyonload function
@pierrot457
@pierrot457 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
@@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.
@realamp07
@realamp07 3 жыл бұрын
It was so nice, I hope you can make tutorial for save and load data in unity from firebase storage to.
@xzippyzachx
@xzippyzachx 3 жыл бұрын
I haven't used the firebase storage yet so maybe if I ever use it I will
@realamp07
@realamp07 3 жыл бұрын
@@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 3 жыл бұрын
@@realamp07 That gets more complicated. Feel free to ask on my discord server if you want my suggestions
@lachlansantos2868
@lachlansantos2868 3 жыл бұрын
the google package registry url no longer works, would you know where i can find the new one?
@xzippyzachx
@xzippyzachx 3 жыл бұрын
Yeah it is no longer used to install the Firebase packages. Read the pinned comment on this video
@rudyramadhana4127
@rudyramadhana4127 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
@@xzippyzachx Thanks! I wasnt using package manager to install firebase SDK though
@justinecoronel4661
@justinecoronel4661 3 жыл бұрын
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 3 жыл бұрын
Yes Firebase is actually build for mobile. Did you try what I suggested in the pinned comment on this video?
@ikee_2947
@ikee_2947 3 жыл бұрын
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)
@Feiee
@Feiee 3 жыл бұрын
05:35 doesnt work for unity 2020.2.1f1. the "My Registries" does not appear. is ther any alternative methods? :/
@xzippyzachx
@xzippyzachx 3 жыл бұрын
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 3 жыл бұрын
Thank you!
@Nikdeckreviews
@Nikdeckreviews 3 жыл бұрын
@@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.
@Keshish4
@Keshish4 3 жыл бұрын
You're legend "SIR" Thank you! :)
@xzippyzachx
@xzippyzachx 3 жыл бұрын
You're welcome!
@calvinms7503
@calvinms7503 Жыл бұрын
How can you prevent the data being tempered from the user side and get uploaded to the server?
@xzippyzachx
@xzippyzachx Жыл бұрын
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.
@everlastingmedia
@everlastingmedia Жыл бұрын
/* Hi there. Another great tutorial. I failed a bit until I checked the comments. *Fortunately I muddled my way through, one small caveat to smooth UI swapping. * I commented out all of the methods for swapping screens. UserDataScreen() .. RegisterScreen() etc. I replaced all of these methods with */ public void SwitchScenes(GameObject nextUI) { if (instance.activeUI.activeInHierarchy) { instance.activeUI.SetActive(false); } instance.activeUI = nextUI; instance.activeUI.SetActive(true); } // added a variable at the top: public GameObject activeUI; // in Awake() I added this: if (!instance.loginUI.activeInHierarchy) { instance.loginUI.SetActive(true); instance.activeUI = instance.loginUI; } //And the magic of all of this is, when I want to switch to a new scene, it doesn't matter which UI I'm travelling from, it will remember, deactivate the "activeUI" and activate the UI passed in the method. UIManager.instance.SwitchScenes(UIManager.instance.userDataUI); // For anyone who sees this comment I hope it makes a difference for you, and HAPPY NEW YEAR
@yanicool1
@yanicool1 3 жыл бұрын
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 3 жыл бұрын
I suggest downloading the complete Unity example project to see how I did all the UI
@Brainyplanet
@Brainyplanet 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
@@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 3 жыл бұрын
@@xzippyzachx but can I import package like previous method thru sdk zip?
@aviationgeek2624
@aviationgeek2624 2 жыл бұрын
Wait what do you mean it starts from the previous? the previous was the auth but how did you combine both
@xzippyzachx
@xzippyzachx 2 жыл бұрын
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 2 жыл бұрын
@@xzippyzachx okay thanks got it 👍
@sjb8178
@sjb8178 11 ай бұрын
best tutorial. u got my heart boii
@xzippyzachx
@xzippyzachx 11 ай бұрын
Glad I could help!
@andresnarvaez3799
@andresnarvaez3799 3 жыл бұрын
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 3 жыл бұрын
Its a database call so usually you can only directly set values
@wolker213
@wolker213 3 жыл бұрын
But how can i edit variables of each registrated user from Firebase site? How can i do this?
@xzippyzachx
@xzippyzachx 3 жыл бұрын
You can edit any of their data from the database module in the Firebase console.
@myanimation5631
@myanimation5631 3 жыл бұрын
but when we sign in and then close the game then open why we have to another time sign in?
@xzippyzachx
@xzippyzachx 3 жыл бұрын
Yes, there are some extra steps you have to do to auto re-login. You can ask on my Discord server if you want
@samsaraAI2025
@samsaraAI2025 3 жыл бұрын
Are you planning to make another tutorial with the FireBase storage? Thanks!
@xzippyzachx
@xzippyzachx 3 жыл бұрын
Maybe if I happen to use it. I haven't yet so I cant make a tutorial about it yet. :p
@marvicbautista7080
@marvicbautista7080 2 жыл бұрын
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 2 жыл бұрын
im trying to access the scores in different scene
@xzippyzachx
@xzippyzachx 2 жыл бұрын
Using multiple scenes would be an issue. The code in this tutorial does not work across multiple scenes on its own.
@MavsFit
@MavsFit 2 жыл бұрын
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 2 жыл бұрын
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.
@Guardabarranc
@Guardabarranc 2 жыл бұрын
@@xzippyzachx Hello, I wanted to know if the registered user has a separate information table? different from any other registered user. Thanks
@plaidev
@plaidev 3 жыл бұрын
LETS GOO 🔥🔥🔥👍👍
@zainkashif3269
@zainkashif3269 3 жыл бұрын
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 3 жыл бұрын
Join my Discord server if you want help
@randomdotrange9528
@randomdotrange9528 2 жыл бұрын
thank you man , just bless you!
@xzippyzachx
@xzippyzachx 2 жыл бұрын
Glad it helped!
@renji16
@renji16 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
@@xzippyzachx how can i join on your discord?
@renji16
@renji16 Жыл бұрын
@@xzippyzachx what is your discord?
@elvinbayramov7389
@elvinbayramov7389 3 жыл бұрын
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 3 жыл бұрын
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
@nachohotdawg5634
@nachohotdawg5634 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
@@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 3 жыл бұрын
@@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
@hichan2870
@hichan2870 2 жыл бұрын
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 2 жыл бұрын
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.
@alexandreeiiiiiii
@alexandreeiiiiiii 3 жыл бұрын
Great tutorial! I just would like something as clear as that on how to authenticate with google and facebook as well
@xzippyzachx
@xzippyzachx 3 жыл бұрын
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
@marvicbautista7080
@marvicbautista7080 2 жыл бұрын
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 2 жыл бұрын
I suggest asking for help on my Discord server
@nurfartinah4534
@nurfartinah4534 3 жыл бұрын
Im new to the unity, how can i get the score element in prefabs ? What should i do to have that element ?
@xzippyzachx
@xzippyzachx 3 жыл бұрын
You can look at the complete example project to see how its done. Or you can join my Discord server to ask for help.
@waymanharris1284
@waymanharris1284 2 жыл бұрын
Great job, thanks for sharing!!
@xzippyzachx
@xzippyzachx 2 жыл бұрын
No problem!
@davescellphone5376
@davescellphone5376 3 жыл бұрын
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 3 жыл бұрын
Nevermind but a good note. I downloaded an updated json file and that fixed it right up.
@xzippyzachx
@xzippyzachx 3 жыл бұрын
Yes the google-services.json file is what links your Unity project to the Firebase console project. It includes the FirebaseDatabase URL
@davescellphone5376
@davescellphone5376 3 жыл бұрын
@@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 3 жыл бұрын
@@davescellphone5376 I see what you mean now. I didn't actually know that thanks! :p
@cosmiccube2961
@cosmiccube2961 2 жыл бұрын
When i build the game, it doesn't save any data. Do you know why?
@xzippyzachx
@xzippyzachx 2 жыл бұрын
Something must be going wrong in the build. Ask for help on my Discord if you don't figure it out
@cosmiccube2961
@cosmiccube2961 2 жыл бұрын
@@xzippyzachx Actually, that works on editor mode only
@cosmiccube2961
@cosmiccube2961 2 жыл бұрын
@@xzippyzachx Maybe it's the database, the connection, the plug-in. I really need help.
@jordivanderpoten5226
@jordivanderpoten5226 3 жыл бұрын
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 3 жыл бұрын
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 KZbin though.
@ayurisqi3481
@ayurisqi3481 3 жыл бұрын
Hello sir, can you please show me how to create a scoreboard view to show data from firebase? thanks
@xzippyzachx
@xzippyzachx 3 жыл бұрын
Is that not what I did in this tutorial?
@charlenejoyconcha3502
@charlenejoyconcha3502 3 жыл бұрын
Is there no problem when im using an android mobile game application?
@xzippyzachx
@xzippyzachx 3 жыл бұрын
Firebase was built for Mobile so it will work yes
@DiegoOliveiraProf
@DiegoOliveiraProf 3 жыл бұрын
this gear does not exist in unity 2019, can't see any google packages on package manager :/
@xzippyzachx
@xzippyzachx 3 жыл бұрын
You have to add them like I explain in the video. If you still cant figure it out feel free to ask for help on my discord server
@DiegoOliveiraProf
@DiegoOliveiraProf 3 жыл бұрын
@@xzippyzachx thanks! I needed to restart Unity, the package was not showing up. The visual studio was not recognizing the Firebase code as well. After the restart it is ok now, thanks for the video!
@muhammadhamzahrobbani5654
@muhammadhamzahrobbani5654 3 жыл бұрын
this is a very useful tutorial! when I tried it directly in Unity like in the video, it went 100% but when I build & run for android, why when I click the "Login" button it doesn't respond to anything? Don't want to enter the 'user data' page, don't display 'wrong password' or 'unregistered email'? it's like not connected to firebase or the internet do I have to add a script to call internet functions on android or something? I'm a beginner, sorry if my question is strange
@xzippyzachx
@xzippyzachx 3 жыл бұрын
I sounds like something isn't working on Android. You can try what I suggested in the pinned comment of my first Firebase video.
@muhammadhamzahrobbani5654
@muhammadhamzahrobbani5654 3 жыл бұрын
@@xzippyzachx I have followed your suggestion and firebase note on web there but still can't, I think the latest version of Firebase has a problem with the Play Services Resolver, it can't compile according to the Android player settings that I set Finally, I re-created the whole project (not re-import) like yours in unity 2018.3.16, downgraded firebase to version 6.10, and everything worked 100% without problems on android
@giftcash9395
@giftcash9395 3 жыл бұрын
How can I work Unique Usernames using Firebase database
@xzippyzachx
@xzippyzachx 3 жыл бұрын
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.
@a_b_n_alhasan9867
@a_b_n_alhasan9867 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
@@xzippyzachx Hello, there is no pinned comment on this video can you help me with it?
@xzippyzachx
@xzippyzachx 3 жыл бұрын
@@utkudagliThe pinned comment got removed some how. It is now re-pinned
@ikee_2947
@ikee_2947 3 жыл бұрын
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 3 жыл бұрын
They got assistance on my Discord server. Feel free to join and ask for help if you have a similar issue.
@JovanJamaica
@JovanJamaica 2 жыл бұрын
Try changing arm64 , that did the trick for me
@ProGamingg
@ProGamingg 3 жыл бұрын
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 3 жыл бұрын
I have answered this on my discord channel. Others feel free to join :p
@akmalfirdaus5457
@akmalfirdaus5457 3 жыл бұрын
may i ask.. this is working with multiple account?
@xzippyzachx
@xzippyzachx 3 жыл бұрын
Yes, its a database. You can do anything with it.
@akmalfirdaus5457
@akmalfirdaus5457 3 жыл бұрын
@@xzippyzachx thank you❤️
@abudriaz9678
@abudriaz9678 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
@@xzippyzachx thank you for the reply will the turn base game also be slow with it
@xzippyzachx
@xzippyzachx 2 жыл бұрын
@@abudriaz9678 Yeah a turn based game is a slow paced game so it would work
@mdinizmobile
@mdinizmobile Жыл бұрын
Hello, its working in 2023??? Thanks
@xzippyzachx
@xzippyzachx Жыл бұрын
Yes, make sure to read the pinned comment for updates
@mdinizmobile
@mdinizmobile Жыл бұрын
Thanks my friend u are the best 👌
@dream_catcher7725
@dream_catcher7725 2 жыл бұрын
is there a way to make a list of items for the user ? and save/load it to firebase database?
@xzippyzachx
@xzippyzachx 2 жыл бұрын
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 2 жыл бұрын
@@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 !!
@misal-isahabe5281
@misal-isahabe5281 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
@@xzippyzachx Thanks.What name is your discord
@xzippyzachx
@xzippyzachx 3 жыл бұрын
@@misal-isahabe5281 Its linked in the description
@墨仔舊頻道
@墨仔舊頻道 3 жыл бұрын
How to save data without the button, please I need your help!!!
@xzippyzachx
@xzippyzachx 3 жыл бұрын
Just call the function that the button is hooked up to
@墨仔舊頻道
@墨仔舊頻道 3 жыл бұрын
@@xzippyzachx thanks, do you mean put the code which is inside the saveButton() to Update()? I have try this way, but it does not worked.... example I have a value to save the last scene player was and I put the database update method to update() and value show on the Firebase website does not changed.
@ahmetinanoglu
@ahmetinanoglu 3 жыл бұрын
Very nice video. It is very helpful
@xzippyzachx
@xzippyzachx 3 жыл бұрын
Glad to hear that! :p
@bebogt5922
@bebogt5922 3 жыл бұрын
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
@xzippyzachx
@xzippyzachx 3 жыл бұрын
I think I helped you on my discord server?
@bebogt5922
@bebogt5922 3 жыл бұрын
Yes that's true
@johnlopez1271
@johnlopez1271 2 жыл бұрын
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 2 жыл бұрын
Thanks! Your best option would be to ask for help on my Discord server.
@trebeltom1234
@trebeltom1234 3 жыл бұрын
This is great thanks! Have you implemented any client prediction/ server reconciliation or lag compensation on top of Tom’s networking architecture?
@xzippyzachx
@xzippyzachx 3 жыл бұрын
Not yet! I only have interpolation right now
@trebeltom1234
@trebeltom1234 3 жыл бұрын
Excellent stuff regardless, inspiring!
@rodneyompoc4457
@rodneyompoc4457 3 жыл бұрын
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 3 жыл бұрын
I believe you asked for help in the Discord server? Right?
@Nikdeckreviews
@Nikdeckreviews 3 жыл бұрын
@@xzippyzachx I am also havin same issue please tell the solution?
@xzippyzachx
@xzippyzachx 3 жыл бұрын
@@Nikdeckreviews Join the discord and explain your issue in the help channel. Thanks :p
@rafikbenamara1
@rafikbenamara1 2 жыл бұрын
@@Nikdeckreviews did you find solution ?
@charlesferry9465
@charlesferry9465 Жыл бұрын
i got data base reference null error even i download full project
@xzippyzachx
@xzippyzachx Жыл бұрын
Did you add your Firebase project's google-services.json file to your Unity project?
@esrivera2228
@esrivera2228 2 жыл бұрын
NICEEEE TUTORIAL , THANKSS
@xzippyzachx
@xzippyzachx 2 жыл бұрын
Np!
@publicalias8172
@publicalias8172 2 жыл бұрын
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 2 жыл бұрын
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 :|
@coffeebean7502
@coffeebean7502 2 жыл бұрын
Can I use this in a WebGL game from unity?
@xzippyzachx
@xzippyzachx 2 жыл бұрын
I am not sure actually. I haven't tried using Firebase with a WebGL Unity build
@jackpottt
@jackpottt 2 жыл бұрын
Great tutorial :) thank you
@xzippyzachx
@xzippyzachx 2 жыл бұрын
Glad it was helpful!
@jackpottt
@jackpottt 2 жыл бұрын
@@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 ?
@hshshshehd4
@hshshshehd4 3 жыл бұрын
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 3 жыл бұрын
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 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 3 жыл бұрын
@@hshshshehd4 Ah yes it only works if the build is 64 bit. No problem! :p
@ronygonzaga115
@ronygonzaga115 3 жыл бұрын
wey me sale error de : NullReferenceException: Object reference not set to an instance of an object FirebaseManager+d__30.MoveNext () (at Assets/Scrips/FirebaseManager.cs:258) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress)
@xzippyzachx
@xzippyzachx 3 жыл бұрын
Looks like a variable is null. Feel free to ask for help on my Discord server
@rafikbenamara1
@rafikbenamara1 2 жыл бұрын
have same probleme, did you fixe it
@azeezomplayz
@azeezomplayz 3 жыл бұрын
Can you help me Save data and Scoreboard isnt working I used the finished Scene and stuff did i do something wrong?
@azeezomplayz
@azeezomplayz 3 жыл бұрын
Also it comes up with permission denied whats going on?
@xzippyzachx
@xzippyzachx 3 жыл бұрын
@@azeezomplayz Join the discord to ask for help :p
@renji16
@renji16 2 жыл бұрын
i hope you also explained how you created the scoreboard ui,
@xzippyzachx
@xzippyzachx 2 жыл бұрын
Well this was a tutorial on Firebase and not UI. You can download the complete project from my GitHub if you want to see how the UI is all setup.
@renji16
@renji16 2 жыл бұрын
@@xzippyzachx i just want to see how you created the prefab and how it used on storing the data on scoreboard, so i can understand and follow the process.
@renji16
@renji16 2 жыл бұрын
@@xzippyzachx i tried to open and i also created a prefab, what i am missing because theres no error but theres no also output (data dont show on scrollview).. i dont know if there something i need to setup to run.
@noumanmobstudios7167
@noumanmobstudios7167 3 жыл бұрын
Awesome Work Buddy...!! You deserve more SUBSCRIBERS lol. ;)
@xzippyzachx
@xzippyzachx 3 жыл бұрын
Thanks! :p
@noumanmobstudios7167
@noumanmobstudios7167 3 жыл бұрын
@@xzippyzachx One thing i have to ask...!! What is Score Element?
@xzippyzachx
@xzippyzachx 3 жыл бұрын
@@noumanmobstudios7167 Its the elements that appear in the scoreboard. Look at the completed example project if you are unsure how it works
@JavaScripting64
@JavaScripting64 3 жыл бұрын
Is there anything to prevent an easy DDOS attack?
@xzippyzachx
@xzippyzachx 3 жыл бұрын
Firebase Rules. You can set special rules on your database to prevent curtain attacks.
@JavaScripting64
@JavaScripting64 3 жыл бұрын
@@xzippyzachx That's great! Would I be able to set up rules to prevent curtain attacks without authentication?
@dranbenedicto2338
@dranbenedicto2338 3 жыл бұрын
Can you do a realtime online multiplayer tutorial? like multiple players moving or like taking turns?
@xzippyzachx
@xzippyzachx 3 жыл бұрын
I have a bunch linked in the description of my first multiplayer game update video. I would suggest watching them
@abudriaz9678
@abudriaz9678 2 жыл бұрын
yes please there is literaly no material on internet on how to make multiplayer game with firebase please make an indepth video on it
@mariogame_dev8004
@mariogame_dev8004 Жыл бұрын
Can i load data from google sheets?
@xzippyzachx
@xzippyzachx Жыл бұрын
Probably not using Firebase. You would need to make a http call to the google sheets API
@mariogame_dev8004
@mariogame_dev8004 Жыл бұрын
@@xzippyzachx yeah i did that. Trying to use rest sharp also so i can do that. But got some issue with unity now after i upload restsharp...
@araelgamer8888
@araelgamer8888 3 жыл бұрын
Hey, Can i get username google sign user e mail ? I mean I dont want to register e mail and password system, I want to google sign in a user and combine with user kill experience.
@xzippyzachx
@xzippyzachx 3 жыл бұрын
Firebase does support google account authentication. You will have to read the Firebase documentation to figure out how to use it though.
@araelgamer8888
@araelgamer8888 3 жыл бұрын
@@xzippyzachx I did google sign authentication. I want to ask basicly how can i do your _username string change user google account email name?
@xzippyzachx
@xzippyzachx 3 жыл бұрын
@@araelgamer8888 I am not sure if you can actually edit your google account information through Firebase. I don't think you can
Что такое Firebase realtime database
7:58
Дмитрий Ченгаев. Веб-разработка.
Рет қаралды 44 М.
龟兔赛跑:好可爱的小乌龟#short #angel #clown
01:00
Super Beauty team
Рет қаралды 13 МЛН
إخفاء الطعام سرًا تحت الطاولة للتناول لاحقًا 😏🍽️
00:28
حرف إبداعية للمنزل في 5 دقائق
Рет қаралды 79 МЛН
REAL 3D brush can draw grass Life Hack #shorts #lifehacks
00:42
MrMaximus
Рет қаралды 10 МЛН
SAVE & LOAD SYSTEM in Unity
18:20
Brackeys
Рет қаралды 1,1 МЛН
The AutoHotkey Experience
12:07
Bog
Рет қаралды 52 М.
Better Save/Load using Data Binding in Unity
18:47
git-amend
Рет қаралды 14 М.
TOUCH CONTROLS in Unity!
16:09
Brackeys
Рет қаралды 1,3 МЛН
How To Start Indie Game Dev the RIGHT WAY in 2024
6:25
Louis DeSimone
Рет қаралды 10 М.
I Made a Horror Game Using ChatGPT
8:47
contenter
Рет қаралды 8 М.
Realtime Database in UNITY - FIREBASE TUTORIAL
9:13
Coco 3D
Рет қаралды 13 М.
龟兔赛跑:好可爱的小乌龟#short #angel #clown
01:00
Super Beauty team
Рет қаралды 13 МЛН