问题
I am using Firebase-Unity beta tool for real time data in my app. I want to change node names in the tree without override its children. For example:
IFirebase firebase;
firebase = Firebase.CreateNew ("https://test1.firebaseio.com/someChild");
firebase_Rank.Child("ChilOne").SetValue(1);
firebase_Rank.Child("ChilTwo").SetValue(2);
firebase_Rank.Child("ChilThree").SetValue(3);
In this kind of tree is it possible to change the names of "ChildOne" without override it's value.
回答1:
The Firebase Database has no way to rename an existing node.
Most developers accomplish a rename by inserting a copy of the node with the new name and then deleting the old node.
来源:https://stackoverflow.com/questions/38261811/how-to-rename-nodes-in-firebase-from-unity