- Home /
Firebase with Unity instantiate new data
Hello Everyone, I just started messing around with Firebase for Unity. I am having trouble with my methods for instantiating a data from firebase.
So what I am trying to accomplish is this: previous comments will be instantiated after my code scans through firebase. (no problem) There will be an imputfield prompt that the user uses to to put a comment and the comment gets saved to Firebase and the prompt closes. Once the prompt closes, i want the newly saved comment from firebase to be instantiated.
but what ended up happening is this: Previous comments gets instantiated user adds new comment comment goes to firebase app instantiates another set of the previous comments W/O the new comment.
I am just trying to figure out a logical method for this and not a script. If i can understand how to accomplish the goals then i can make a script for it.
What do you guys think? or is there an alternative method or workaround for this?
Thank you
Answer by giusti · Oct 26, 2019 at 05:07 PM
You could re-load all of them every time. A better solution may be to instantiate the comment just based on the input fields and not involve FireBase in the instantiation of the new comment (aside from saving it).