Quantcast
Channel: Questions in topic: "javascript"
Viewing all articles
Browse latest Browse all 68

Unity WebGL form posts to Cloud Firestore with Firebase JS SDK

$
0
0
My goal is to build a WebGL game in Unity that has a specific form and upon submission that form posts data into one of the Firebase storage solutions. After reading [this article][1], it's clear to me I need to use Cloud Firestore instead of Realtime Database. Good news is that as of of March 2020, [one of the team members wrote][2], > we released Firebase Unity SDK 6.12.0 which includes an alpha release> of Firestore. Thing is, Firebase's Unity SDK isn't for WebGL builds and, for someone going through that thought process, could use [Firebase JS SDK][3] (spam alert). From looking at the [release notes][4], one can see that Firebase JS SDK supports Firestore and so this has all the conditions in place for a quick solution. So, I've gone to Firebase console, created a project, a Web app to use Firebase JS SDK and this process gave as output the following code with a message saying > Copy and paste these scripts into the bottom of your tag, but> before you use any Firebase services In addition to that, this is [how to Call JavaScript functions from Unity scripts][5] and this is a [Cloud Firestore JS Sample App][6]. Given this information, how can then the form be created? [1]: https://firebase.googleblog.com/2017/10/cloud-firestore-for-rtdb-developers.html [2]: https://github.com/firebase/quickstart-unity/issues/381#issuecomment-595845307 [3]: https://stackoverflow.com/a/60883058/5675325 [4]: https://firebase.google.com/support/release-notes/js [5]: https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html [6]: https://github.com/tiago-peres/quickstart-js/tree/master/firestore

Viewing all articles
Browse latest Browse all 68

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>