I followed all steps such as adding the database SDK to Unity etc., but when I try to connect Unity to Firebase, I'm getting an error.
Assets\Script\RealTimeLoading.cs(14,21): error CS0029: Cannot implicitly convert type 'Firebase.Database.DatabaseReference' to 'DatabaseReference'
I followed a lot of tutorials, they are never getting errors, just me. Here is my code
using Firebase;
using Firebase.Database;
using Firebase.Unity.Editor;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RealTimeLoading : MonoBehaviour
{
DatabaseReference reference;
// Start is called before the first frame update
void Start()
{
reference = FirebaseDatabase.DefaultInstance.RootReference;
}
// Update is called once per frame
void Update()
{
}
}
The error is on this line:
FirebaseDatabase.DefaultInstance.RootReference;
What did I do wrong?