private void addListeners() { Firebase.Database.DatabaseReference dbRef = database.GetReference(tableName); dbRef.ChildAdded += OnChildAdded; dbRef.ChildChanged += OnChildChanged; dbRef.ChildRemoved += OnChildRemoved; }
// Initialization method. Called after the state // is added to the stack. public override void Initialize() { database = Firebase.Database.FirebaseDatabase.GetInstance(CommonData.app); database.GetReference(path).GetValueAsync().ContinueWith(HandleResult); menuComponent = SpawnUI <Menus.SingleLabelGUI>(StringConstants.PrefabsSingleLabelMenu); UpdateLabelText(); }
public DBStruct(string name, Firebase.FirebaseApp app) { this.app = app; database = Firebase.Database.FirebaseDatabase.GetInstance(this.app); dbPathName = name; data = new T(); newData = new T(); database.GetReference(dbPathName).ValueChanged += OnDataChanged; }
// Initialization method. Called after the state // is added to the stack. public override void Initialize() { Network.TestConnection(true); database = Firebase.Database.FirebaseDatabase.GetInstance(CommonData.app); database.GetReference(path).ValueChanged += HandleResult; menuComponent = SpawnUI <Menus.SingleLabelGUI>(StringConstants.PrefabsSingleLabelMenu); UpdateLabelText(); }