How to remove all listeners from Firebase in C#?

Viewed 1157

In my project I've got quite a nice amount of listeners set to listen for any changes in the realtime database. For some reason those listeners stay even if I reload the scene using

Application.LoadLevel("mainScene");

It would be quite a lot of hassle to remove each listener individually using

FirebaseDatabase.DefaultInstance
    .RootReference
    .Child("sub path 1")
    .Child("sub path 2")
    .ValueChanged -= SomeFunction;

FirebaseDatabase.DefaultInstance
    .RootReference
    .Child("path")
    .ValueChanged -= AnotherFunction;

Is there a way to remove listeners from all paths?

1 Answers
Related