0
我正嘗試使用Unity和Firebase創建授權場景。我的C#腳本的屏幕截圖以及顯示的錯誤附在此處。是否需要爲集成Firebase指定單獨的目錄?我瀏覽了此鏈接中提供的文檔:https://firebase.google.com/docs/auth/unity/password-auth。 我已經完成了所有的步驟。請通過它,告訴我我錯過了什麼!將Firebase與Unity集成
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using System;
using System.Collections.Generic;
public class SignUp : MonoBehaviour
{
\t public GameObject list;
\t public Text email;
\t public Text password;
\t public GameObject logIn;
\t Firebase.Auth.FirebaseAuth auth = Firebase.Auth.FirebaseAuth.DefaultInstance;
\t private string userID;
\t private string pass;
\t // Use this for initialization
\t void Start()
\t {
\t \t //Firebase.Auth.FirebaseAuth auth = Firebase.Auth.FirebaseAuth.DefaultInstance;
\t }
\t
\t // Update is called once per frame
\t void Update()
\t {
\t \t auth.CreateUserWithEmailAndPasswordAsync (userID, pass).ContinueWith (task => {
\t \t \t if (!task.IsCanceled && !task.IsFaulted)
\t \t \t \t Debug.Log ("User Created");
\t \t \t else
\t \t \t \t Debug.Log ("User Creation Failed");
\t \t });
\t }
\t public void signUp()
\t {
\t \t list.SetActive (true);
\t \t logIn.SetActive (false);
\t }
\t public void details()
\t {
\t \t userID = email.text.ToString();
\t \t pass = password.text.ToString();
\t \t print (userID);
\t \t print (pass);
\t }
}
你的屏幕截圖在哪裏?順便說一下,不要張貼截圖,請直接發佈代碼。 –
我已經做了@MichaelFaisst – Meenakshi
那麼錯誤是什麼? – UnholySheep