Join Harrison Ferrone for an in-depth discussion in this video Save player data, part of Unity: Working with Google Firebase.
- [Instructor] In order to save our new players…to the database, we need to create a new method…in our database manager.…We want this to take in a player object…and perform all the necessary work inside the method…so our off manager can call it…without needing to know the details.…I'm going to delete the update function,…I'm going to declare a new public void method…called "create new player,"…and this is going to take in a player,…and a string, for the UID.…
Inside the method, we need to convert the new player object…to raw Jshon in order to put it to the database.…Going to store this in a string called "player Jshon,"…and we're going to use the Jshon utility….toJshon, and just pass it in the player object.…Now, we can call our router class,…and push the Jshon string directly to the database.…Router, player, with UID,…we're going to use the UID we passed in,…and we're going to use the set raw Jshon value…async method,…and here this is just looking for a Jshon string,…so we're going to pass in player Jshon.…
We're using the player's UID here as the key,…
- 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.