Version Gate

Overview

One version check covers both the agreements a player accepted and the app and asset versions the client reports. Answer the required terms (latest 2.0.0) and the optional marketing, pick the versions the client claims, and press Check versions to see ok, warning or error for each. The check passes only when nothing is an error, and then GS2 issues a project token.

How to try it

  1. Read the rule under Terms and versions. At first, Your answers shows terms: not answered and marketing: not answered.
  2. Press Check versions without answering: terms and marketing are errors because they are unanswered, app 1.0.0 and asset 0.9.0 are errors too, and the verdict reads Not passed: no project token.
  3. Press Accept terms 1.0.0 (an old version) and terms becomes a warning; press Accept terms 2.0.0 (the latest) and it is ok. marketing is ok whether you press Accept marketing or Reject marketing.
  4. Press App version … (press to change) and Asset version … (press to change) to change what the client reports: app 1.0.0 (error), 1.1.0 (warning) or 1.2.0 (ok); asset 0.9.0 (error), 1.5.0 (warning) or 2.1.0 (ok).
  5. With no errors left, press Check versions; the verdict reads Passed: GS2 issued a project token. Press Clear my answers to start over.

GS2 services used

  • GS2-Version: GS2-Version defines the agreements a player answers, terms (required) and marketing (optional), and the app and asset versions the client reports, and keeps each player’s answers. The version check rates each one as warning or error, and a player who passes gets the project token of a demo user that has no permissions at all.

Use it in GS2 Studio

In GS2 Studio’s Simple mode, open Add features and press Add on Version Gate to bring this feature into your own project. To point at the package directly, choose Add from GitHub and enter the package below.

https://github.com/gs2io/gs2-studio-package/tree/main/foundation-liveops-version/packages/foundation-liveops-version
  • Owner: gs2io
  • Repository: gs2-studio-package
  • Subdirectory: foundation-liveops-version/packages/foundation-liveops-version

Source code