首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将Firebase与Unity集成

将Firebase与Unity集成
EN

Stack Overflow用户
提问于 2016-11-21 23:06:11
回答 1查看 967关注 0票数 0

我正在尝试使用Unity和Firebase创建一个授权场景。这里附上了我的C#脚本的屏幕截图以及显示的错误。是否需要为集成Firebase指定单独的目录。我浏览了这个链接中提供的文档:https://firebase.google.com/docs/auth/unity/password-auth。我已经完成了所有的步骤。请看一遍,告诉我我遗漏了什么!

代码语言:javascript
复制
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using System;
using System.Collections.Generic;

public class SignUp : MonoBehaviour 
{
	public GameObject list;
	public Text email;
	public Text password;
	public GameObject logIn;
	Firebase.Auth.FirebaseAuth auth = Firebase.Auth.FirebaseAuth.DefaultInstance;
	private string userID;
	private string pass;

	// Use this for initialization
	void Start () 
	{
		//Firebase.Auth.FirebaseAuth auth = Firebase.Auth.FirebaseAuth.DefaultInstance;
	}
	
	// Update is called once per frame
	void Update ()
	{
		auth.CreateUserWithEmailAndPasswordAsync (userID, pass).ContinueWith (task => {
			if (!task.IsCanceled && !task.IsFaulted)
				Debug.Log ("User Created");
			else
				Debug.Log ("User Creation Failed");
		});
	}

	public void signUp ()
	{
		list.SetActive (true);
		logIn.SetActive (false);
	}

	public void details ()
	{
		userID = email.text.ToString ();
		pass = password.text.ToString ();
		print (userID);
		print (pass);
	}
}

EN

回答 1

Stack Overflow用户

发布于 2016-11-22 02:02:07

我发现了哪里出了问题。显然,Firebase Auth不能在Unity Editor中实现。https://github.com/firebase/quickstart-unity/issues/3

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40723249

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档