smallopk.blogg.se

Unity firebase sdk
Unity firebase sdk










This will mean this splash screen is loaded first when the app opens. Once you have your scene to your liking, make sure you have added it to the build by going to File > Build Settings… and drag it to the top of the list (index 0). The design doesn’t matter for the same of this process, as it’s just a placeholder to load a script. You can decide to use a blank screen, a screen with a loading bar and/or your logo, or anything really. I’m not a designer, so the creative direction in this step is down to you. It only appears for a very short amount of time, so in my example I decided to keep the design the same as my home screen, but with the word “Loading…” in the middle just to be able to tell them apart. In Unity, create a new scene and call is something like “Splash” (or similar). Google Analytics 4) to your Unity project.

unity firebase sdk

Prerequisites: You should already know the basics of Unity and have set up a Firebase project and added Firebase Analytics (i.e. If you spot any errors or issues, please let me know! I’m a hobbyist at best that tinkers with building Android apps and games in Unity. To be 100% transparent, I’m not an app developer. You could try and do some clever stuff with scripts, sequencing, dependencies and the like, but by far the easiest way is to set up a loading or splash screen to do all of the initialisation. This will also enable the automatically collected events are tracked, well, automatically. Google Analytics 4) events you may have set up.

unity firebase sdk

The issue is that you need to ensure that this script is run before any custom Firebase Analytics (i.e. However, that’s easier said than done in Unity.

unity firebase sdk

When adding Firebase to your Unity project, part of the standard documentation steps is to ‘Confirm Google Play services version requirements’, which just (unhelpfully) says to “Add the following code at the start of your application”. This scene can be used to load all of the behind-the-scenes scripts without risk of it affecting any other tracking you have in the app. Initialising Firebase in an app can be done in many ways, but in Unity the simplest is to add a splash screen whenever the app opens.












Unity firebase sdk