The type or namespace name 'Editor' does not exist in the namespace 'Firebase.Unity'

Hi, I’m trying to make a chat system with firebase in Unity.
First of all, I’m trying to connect firebase database with Unity so at the name space I declared ‘using Firebase.Unity.Editor;’.
But the unity console is giving me this error
The type or namespace name ‘Editor’ does not exist in the namespace ‘Firebase.Unity’ (are you missing an assembly reference?)
I imported Unity database sdk and google service json file.
Am I missing something?

Please help me with this.


using System;
using Firebase;
using Firebase.Database;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
using Firebase.Unity.Editor;

public class DatabaseAPI : MonoBehaviour
{
private DatabaseReference referance;
// Start is called before the first frame update
private void Start()
{
FirebaseApp.DefaultInstance.SetEditorDatabaseUrl();
referance = FirebaseDatabase.DefaultInsatance.RootReference;
}

private void SendMessage(Message message, Action callback, Action fallback)
{
	reference.Child("message").Push().SetValueAsync(message).continueWithOnMainThread(task =>
	{
		if(task.IsCanceled || task.IsFaulted) fallback(task.Exception);
		else callback();
	});
}
private void ListenForMessages(EventHandler<ChildChangedEventArgs> callback)
{
	referance.Child("message").ChildAdded += callback;
}

}

using Firebase.Unity; //is deperacated in Latest Unity Firebase SDK.

Steps:

Step 1: Comment the //using Firebase.Unity.Editor;
Also comment //FirebaseApp.DefaultInstance.SetEditorDatabaseUrl(“https://yourApp-a6192.firebaseio.com/”);

Step 2: Called in Awake() or Start() Create script DatabaseAPI.cs

    bool isFirebaseInitialized = false;
  void Awake(){FirebaseInit();}
    void FirebaseInit()
    {
        var dependencyResult = await FirebaseApp.CheckAndFixDependenciesAsync();
        if(dependencyResult == DependencyStatus.Available)
        {
                app = Firebase.FirebaseApp.DefaultInstance;
                isFirebaseInitialized = true;
                // Set a flag here to indicate whether Firebase is ready to use by your app.
        }
        else
        {
             UnityEngine.Debug.LogError(System.String.Format(
                      "Could not resolve all Firebase dependencies: {0}", dependencyStatus));
              isFirebaseInitialized = false;
             // Firebase Unity SDK is not safe to use here.
        }
    }