Skip to content

GameStats Unity Sample implementation - #122

Open
wickedcube wants to merge 3 commits into
mainfrom
wickedcube/game_stats_unity
Open

GameStats Unity Sample implementation#122
wickedcube wants to merge 3 commits into
mainfrom
wickedcube/game_stats_unity

Conversation

@wickedcube

Copy link
Copy Markdown
Contributor
  • Added GameStatsController.cs: Implements Google Play Games Services (PlayerGameEvent) stats logging with compile-time
  • Wired GameStats.unity UI: Attached the controller to the scene canvas and wired all 8 TMP_Dropdown controls and 4 action buttons (raceCompletedButton, carUpgradedButton, sendProgressionButton, and requestEventsUploadButton)
  • Mapped raceCompleted Event: Logs carUsed (string, lowercased for mustang filter matching), rank (long, matching "Races won"), usedNos (bool), and raceTime (double, seconds for "Fastest race").
  • Mapped carUpgraded Event: Logs carCharacteristic (string), oldValue (string), newValue (string), and garageLevel (long) matching localization schema types.
  • Added Progression & Batch Upload APIs: Implemented currentProgress progression event logging and manual event batch flushing via PlayGamesPlatform.Instance.RequestEventsUpload().
  • Imported TMPro default assets

@wickedcube wickedcube self-assigned this Aug 15, 2026
col *= 1 - (dot(n, light) * _Diffuse);
col *= lerp(_Ambient, 1, n.z * n.z);

//fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDir, -n));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this code? Might worth adding a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are default TMPro imports, users usually have to this on their own anyway


2026-08-12: 1.2.0 - Added Play Games Services (PGS) Game Stats support with PlayerGameEvent recording, GameStats demo scene, and configuration resources.

2026-05-22: 1.1.2 - Upgraded to Unity 6.3 LTS and com.unity.purchasing 5.3.0 and changed the Support section to Troubleshooting and added content.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to think about the supoprted Unity verisions, as many games run on 2022 and 2023 if not older

@borisf borisf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added 2 comments, the main one about the Uinty version, as we need to make sure our samples run on all Unity supported versions

@wickedcube

Copy link
Copy Markdown
Contributor Author

I can keep this PR open till we properly fix PGS plugin dependancies for Older versions

@borisf

borisf commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Works for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants