A template project used primarily for ludum dare game jams.
Contains a few preset up functionality and systems, including:
- Basic generic achievement system (uses user prefs for data so is not cheat safe) - possible improvement, add cheat protection.
- Scalable and generic UI composite state switching system with template setups
- Editor tools including ReadOnlyAttributes for vars in inspector, and struct editing in place for inspector references
- Audio system with mix groups, object pooling and easy volume integration
- A simple template main menu screen
- Analytics basics and startup logic
- Unity 2022.2.17f1
- git LFS Note, not used in the template as git does not support lfs templating, so needs to be manually enabled
- Game Jam entry: XXX
- Itch link to play: XXX
Sign up for Google Cloud
As per https://firebase.google.com/docs/projects/terraform/get-started:
- Install Terraform
- Install Google Cloud CLI
- Login with
gcloud auth application-default login
- Edit Infrastructure/vars.tf and set the values you need
- It's important to set
unrelated_gcp_project_to_verify_billing
. When you signed up for Google Cloud it should have created a project, you can use that ID
- It's important to set
- Run
terraform -chdir=Infrastructure init
- Run
terraform -chdir=Infrastructure apply -auto-approve
- View the infrastructure at https://console.firebase.google.com/ or https://console.cloud.google.com/welcome
As per https://firebase.google.com/docs/unity/setup#add-config-file:
- Open the Firebase console and select the recently created project
- In the left menu, next to Project Overview click the Gear and select Project Settings
- On the General tab, scroll down to "Your apps"
- Click the Android app and download the
google-services.json
file - Click the iOS app and download the
GoogleService-info.plist
file - Copy these files into the Assets folder
- Go to https://developers.google.com/unity/packages#firebase and download the following packages:
- In your open Unity project, navigate to Assets | Import Package | Custom Package
- In the Import Unity Package window, click Import
If you encounter a 403 saying that the Firebase Management API or another permission has not been enabled, wait a little while and run terraform apply
again.
In order to use the Unity Analytics for this project, you must follow the steps:
- Setup a Unity Project in https://dashboard.unity3d.com/gaming
- Setup Analytics inside this project by selecting 'Start Using Analytics'
- Follow the steps given to link the correct project ID and Organisation from the UGS project, into the project settings of Unity
- Ensure that the first screen you want analytics to begin from contains a game object with the script UnityAnalytics.cs attached before calling any other analytics related code Documentation: https://docs.unity.com/analytics/manual/UnityAnalytics Learning tools: https://learn.unity.com/project/unity-analytics
Note that you can enable the scripting debug mode for analytics by doing:
- In the Unity Editor, go to Edit > Project Settings > Player Settings > Player.
- Locate the Script Compilation section and select Scripting Define Symbols.
- Add the keyword “UNITY_ANALYTICS_EVENT_LOGS”.
- Select Apply.