Unity User Data & Scoreboard Tutorial - Firebase Realtime Database

Unity User Data & Scoreboard Tutorial - Firebase Realtime Database

xzippyzachx

3 года назад

96,910 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Miguel Diniz
Miguel Diniz - 16.09.2023 18:09

Hello, its working in 2023??? Thanks

Ответить
Manuel Silvestre
Manuel Silvestre - 16.09.2023 17:34

legit full lag

Ответить
MontAureal
MontAureal - 10.08.2023 20:35

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

Ответить
Mario Game_Dev
Mario Game_Dev - 31.07.2023 15:46

Can i load data from google sheets?

Ответить
Calvin MS
Calvin MS - 18.07.2023 06:02

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

Ответить
Rudy Ramadhana
Rudy Ramadhana - 11.07.2023 11:49

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

Ответить
Spiderfish
Spiderfish - 09.06.2023 22:37

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.

Ответить
Kian
Kian - 30.05.2023 07:58

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

Ответить
Project Abash
Project Abash - 15.05.2023 23:28

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();

Ответить
Dashcam Supercam
Dashcam Supercam - 17.04.2023 19:09

hey i am getting a bunch of errors and i simply cannot fix them

Ответить
Charles Ferry
Charles Ferry - 12.02.2023 18:32

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

Ответить
Charles Ferry
Charles Ferry - 10.02.2023 11:39

i got data base reference null error even i download full project

Ответить
Everlasting Media
Everlasting Media - 30.12.2022 12:13

/* 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 <3

Ответить
Amateur Interactive
Amateur Interactive - 14.12.2022 09:08

Very helpful tutorial buddy! Thanks :)

Ответить
Movie Studio
Movie Studio - 01.12.2022 22:04

is this hackable?

Ответить
Nguyen Khoa
Nguyen Khoa - 22.11.2022 18:02

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

Ответить
dream_ catcher
dream_ catcher - 24.10.2022 00:52

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

Ответить
Ren Ji
Ren Ji - 22.10.2022 11:25

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.

Ответить
Stefanos Kapsoritakis
Stefanos Kapsoritakis - 19.10.2022 14:35

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.

Ответить
Ren Ji
Ren Ji - 04.10.2022 02:53

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

Ответить
Ren Ji
Ren Ji - 03.10.2022 15:29

i hope you also explained how you created the scoreboard ui,

Ответить
Ranataro Sama
Ranataro Sama - 23.09.2022 12:08

hey can anybody help me .....when i click on scoreboard button it's showing me

NullReferenceException: Object reference not set to an instance of an object
FirebaseManager+<LoadScoreboardData>d__36.MoveNext () (at Assets/Scripts/FirebaseManager.cs:397)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <0ee480759f3d481d82ada245dc74f9fd>:0)

beside login and saving data method is working fine but i stuck here .hope someone have any good solutions

Ответить
DevilGaming Force
DevilGaming Force - 26.08.2022 13:17

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

Ответить
torveno 04
torveno 04 - 15.08.2022 03:31

SIR HOW TO RESET DATA FROM SCOREBOARD?

Ответить
CNHS VolcARno
CNHS VolcARno - 11.08.2022 11:39

help me sir NullReferenceException: Object reference not set to an instance of an object
FirebaseManager+<LoadScoreboardData>d__34.MoveNext () (at Assets/Scripts/FirebaseManager.cs:378)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <84f51b1b0ff2473ca787c217e1eda8b9>:0)

Ответить
Aviation Geek
Aviation Geek - 07.08.2022 23:48

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

Ответить
Cosmic cube
Cosmic cube - 13.07.2022 18:23

When i build the game, it doesn't save any data.
Do you know why?

Ответить
Kalib Crone
Kalib Crone - 21.06.2022 18:20

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

Ответить
Alec
Alec - 20.06.2022 15:09

Here for the bros

{
"rules": {
"users": {
".read": "auth != null",
"$user_id": {
".write": "$user_id === auth.uid",
}
}
}
}

Ответить
AppWay India
AppWay India - 01.06.2022 08:07

Object reference not set to an instance of an object WHAT SHOUD I DO

Ответить
Coffee Bean
Coffee Bean - 30.05.2022 21:24

Can I use this in a WebGL game from unity?

Ответить
EDISSON STEVEN RIVERA MENDEZ
EDISSON STEVEN RIVERA MENDEZ - 24.05.2022 06:48

NICEEEE TUTORIAL , THANKSS

Ответить
Hichan
Hichan - 10.05.2022 11:34

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

Ответить
bigchungus Online
bigchungus Online - 06.05.2022 15:12

Well cant you just use unity instead of firebase at all

Ответить
Ida Meyer
Ida Meyer - 07.04.2022 21:51

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?

Ответить
Marvic Bautista
Marvic Bautista - 09.03.2022 09:28

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

Ответить
Marvic Bautista
Marvic Bautista - 02.03.2022 18:55

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

Ответить
ehsan hadipoor
ehsan hadipoor - 20.02.2022 21:11

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

Ответить
ehsan hadipoor
ehsan hadipoor - 20.02.2022 20:50

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

Ответить
p0mf!
p0mf! - 19.02.2022 08:32

bruh make update and delete data, a complete crud system for unity

Ответить
Abud Riaz
Abud Riaz - 17.02.2022 23:05

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

Ответить
Turbulence101 Games
Turbulence101 Games - 17.02.2022 21:25

Thanks!

Ответить
Public Alias
Public Alias - 15.02.2022 06:15

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..

Ответить
Mehmet Caliskan
Mehmet Caliskan - 07.02.2022 21:14

Great tutorial :) thank you

Ответить
Wayman Harris
Wayman Harris - 31.01.2022 01:25

Great job, thanks for sharing!!

Ответить
Rahmad Hadi
Rahmad Hadi - 26.01.2022 11:44

Can firebase be used for desktop games?

Ответить
Pedro Joclar
Pedro Joclar - 01.01.2022 04:49

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 ?

Ответить
RandomDotRange
RandomDotRange - 28.12.2021 03:03

thank you man , just bless you!

Ответить
MavsFit
MavsFit - 18.12.2021 00:54

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?)

Ответить