How andreaskarageorgos/itch.io-licensing-for-unity works
This Unity integration gates game access through itch.io ownership verification, then uses an encrypted, machine-bound license for offline launches and periodic rechecks. The principal flow is coordinated by ItchOwnershipCheck; license persistence and validation live in ItchLicenseCache. The README also documents per-project secret generation and the player-facing setup. Some login and recheck internals are only partially excerpted, so the graph avoids asserting finer-grained calls than the excerpts or README support.
Main entry points: ItchLicenseCache.cs License validation · ItchOwnershipCheck.cs Access controller · ItchSecrets.cs Generated secrets · ItchLicenseConfig.cs Offline duration
Components 17
Game access
- Access controller
ItchOwnershipCheck.cs - Game access state
ItchOwnershipCheck.cs - Quiet rechecks
ItchOwnershipCheck.cs
Online verification
- itch.io login
- Local callback
ItchOwnershipCheck.cs - Ownership API
- Developer check
ItchOwnershipCheck.cs
Offline license
- License validation
ItchLicenseCache.cs - License cryptography
ItchLicenseCache.cs - License file
- Hardware identity
ItchLicenseCache.cs
Project configuration
- Offline duration
ItchLicenseConfig.cs - Project settings
ItchStrings.cs - Generated secrets
ItchSecrets.cs - Secrets generator
Editor/ItchSecretsGenerator.cs
Other components
- Player
- Unity game
Connections 23
- Player → Access controller: starts game
README.md - Access controller → License validation: checks license
ItchOwnershipCheck.cs - Access controller → Local callback: starts login listener
ItchOwnershipCheck.cs - Local callback → itch.io login: opens login
README.md - itch.io login → Local callback: returns token
README.md - Access controller → Ownership API: checks ownership
ItchOwnershipCheck.cs - Ownership API → Access controller: returns ownership
ItchOwnershipCheck.cs - Access controller → License validation: saves license
ItchOwnershipCheck.cs - Access controller → Developer check: checks developer
ItchOwnershipCheck.cs - Access controller → Game access state: sets access
README.md - Unity game → Quiet rechecks: runs during play
README.md - Quiet rechecks → License validation: rechecks license
ItchOwnershipCheck.cs - Quiet rechecks → Game access state: delays lockout
ItchOwnershipCheck.cs - Unity game → License validation: verifies later scenes
README.md - License validation → License file: reads and writes
ItchLicenseCache.cs - License validation → License cryptography: validates and encrypts
ItchLicenseCache.cs - License validation → Hardware identity: binds to device
ItchLicenseCache.cs - License validation → Offline duration: reads expiry
ItchLicenseCache.cs - License validation → Project settings: reads file settings
ItchLicenseCache.cs - Offline duration → Generated secrets: loads settings
ItchLicenseConfig.cs - Project settings → Generated secrets: loads values
ItchStrings.cs - Secrets generator → Generated secrets: generates local values
README.md - Player → itch.io login: logs in
README.md