A Unity package that makes use of the Firebase Javascript SDK to implement the basic Realtime Database functions on WebGL builds.
A Unity package that makes use of the Firebase Javascript SDK to implement the basic Realtime Database functions on WebGL builds.
A Unity package that makes use of the Firebase Javascript SDK to implement the basic Realtime Database functions on WebGL builds
const firebaseApp = firebase.initializeApp({
apiKey: "XXXXXXXXXXXXXXX",
authDomain: "XXXXXXXXXX.firebaseapp.com",
databaseURL: "https://XXXXXXXXXXXXXXX.firebaseio.com",
projectId: "XXXXXXXXXXXXXX",
storageBucket: "XXXXXXXXXXXXX.appspot.com",
messagingSenderId: "XXXXXXXXXXXXX",
appId: "X:XXXXXXXXXXXXXXX:web:XXXXXXXXXXXXXXXX",
measurementId: "XXXXXXXXXXXXX"
});
const db = firebaseApp.firestore();
const auth = firebaseApp.auth();
// declare other services here...// add this lines before the final
window.unityInstance = unityInstance) must now also be added in your index.html, when the unityInstance is created (after the }).then((unityInstance) => { line) so that your app can properly comunicate with Unity.script.onload = () => {
createUnityInstance(canvas, config, (progress) => {
progressBarFull.style.width = 100 * progress + "%";
}).then((unityInstance) => {
// add this line :
window.unityInstance = unityInstance;
loadingBar.style.display = "none";
// ...No open issues yet, or sync has not completed.