From the course: Unity: Working with Google Firebase

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Sign up with email and password

Sign up with email and password

From the course: Unity: Working with Google Firebase

Start my 1-month free trial

Sign up with email and password

- [Instructor] At this point I think we're ready to start coding our AuthManager script. So go into the Scripts folder and double-click on the AuthManager. In the FormManager script I've already bookmarked where we'll call our Firebase methods from, but since we want to have some decent code architecture here we're going to do the actual implementation in the AuthManager script. The first thing we need is some new using directives, so up above using UnityEngine make some room and type in using Firebase. We also need using Firebase.Auth. Next, we're going to declare a Firebase.Auth variable to use throughout the script. So at the top of the class make some room, I'm going to put in a comment here, Firebase API variables. Now this variable is going to be of type Firebase.Auth.FirebaseAuth and, funnily enough, we're going to call this auth with a little A. This is going to give us automatic access to things like the current user information without having to make any specific API calls…

Contents