Join Harrison Ferrone for an in-depth discussion in this video Different write methods, part of Unity: Working with Google Firebase.
When we saved our player data, we used…the SetRawJsonValueAsync method,…but this isn't the only way to handle…saving or updating data in our database.…For starters, the SetValueAsync method acts…largely the same as the SetRawJson…in that it takes in a value and puts it…at the reference path.…You can also use the push method…which will generate an automatic key…for the data entry, similar to what…we did with storing our players…under their unique IDs.…With the SetValue and the SetRawJsonValueAsync methods,…it's important to understand that all data…at that reference path will be overwritten,…so be careful when using them.…
Both of these are good for nonconcurrent…data saving, and while you can use them…to update data within nodes, it's easier…and less error-prone to use the UpdateChildrenAsync…or transaction methods.…The UpdateChildrenAsync takes dictionaries…of paths and data and only updates the…given nodes without overwriting…other data at that node.…In our game, this would be a great use case…for updating a player's score without overwriting…
- Working with Firebase
- Adding signup and login functionality
- Building a player class
- Saving data
- Retrieving data
- Displaying data in the Unity GUI
- Making a reusable asset package for other Unity projects
Skill Level Intermediate
Building Custom Tools to Extend the Unity IDEwith Jesse Freeman2h 11m Intermediate
Careers in the Game Industrywith Christian Bradley1h 19m Beginner
Unity 5: 2D Building an Adventure Gamewith Jesse Freeman2h 22m Intermediate
1. Project Overview
2. Introduction to Firebase
3. Authenticating Players
4. Using the Realtime Database
5. Displaying Data
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.