UnityにFireBaseを導入したいです。
UnityでFireBaseを使えるようにしたいです。
発生している問題・エラーメッセージ
UnityにandroidでFireBaseSKDをインポートし使える状態にしたはずなのですが、
JAVA_HOME enviromnet references a directory (パス) that dose not contain java whoch is required to process Android libraris.
というエラーが出てしい、FireBaseが使えません。
また、FireBase関数も実行できません。
InvalidOperationException: Don't call Firebase functions before CheckDependencies has finished
該当のソースコード
C#
1using System.Collections; 2using System.Collections.Generic; 3using UnityEngine; 4using Firebase; 5using Firebase.Database; 6using Firebase.Unity.Editor; 7 8public class RealtimeDatabase : MonoBehaviour 9{ 10 11 12 13 // Start is called before the first frame update 14 void Start() 15 { 16 Firebase.FirebaseApp.CheckAndFixDependenciesAsync().ContinueWith(task => { 17 var dependencyStatus = task.Result; 18 if (dependencyStatus == Firebase.DependencyStatus.Available) { 19 20 } else { 21 UnityEngine.Debug.LogError(System.String.Format("Could not resolve all Firebase dependencies: {0}", dependencyStatus)); 22 } 23 }); 24 FirebaseApp.DefaultInstance.SetEditorDatabaseUrl("https://(プロジェクトID).firebaseio.com/"); 25 } 26 27 void Update() 28 { 29 30 } 31}
補足情報(FW/ツールのバージョンなど)
Unity 2019.3.6f
firebase_unity_sdk_6.13.0
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/04/15 16:30