PlaytoliaAuth, PlaytoliaSession, PlaytoliaSocial, and so on) work on Windows. The same SDK UI (overlay button, sign-in sheet, menu, and all screens) appears in the game.
On Windows, the package loads a native library (playtolia.dll). It draws the SDK UI as a full-screen overlay on top of your game, and sends mouse and keyboard input to it.
Requirements
- Build target: Windows, x86_64 (
StandaloneWindows64). 32-bit Windows is not supported. - Input handling: the overlay reads input through the legacy Input Manager. Set Edit ▸ Project Settings ▸ Player ▸ Other Settings ▸ Active Input Handling to Input Manager (Old) or Both. If you set it to Input System Package (New) only, the overlay cannot receive clicks or keys.
playtolia.dll and its runtime libraries in Plugins/Windows/x86_64. They are marked for Windows x64 players only.
Build
Build your game for Windows as usual (File ▸ Build Profiles ▸ Windows). After the build, the package does two things automatically:- It writes your Playtolia settings (Game ID and features) to
<Product>_Data/Playtolia/playtolia_conf.json. The SDK reads this file at startup. - It copies
icudtl.datnext to the executable. The SDK UI needs this file to lay out text.
playtolia_conf.json is missing, the SDK does not start and the player log shows configuration not found.
The native library loads only in a Windows player build. In Play Mode in the Unity Editor, the Windows overlay does not run. Test Windows-specific behavior in a built player.
Startup
ThePlaytolia GameObject starts the SDK on Windows, as it does on mobile. Startup waits until the SDK is ready, so code in Start() can call the SDK right away. On a slow network, the SDK finishes startup in the background, and the state listeners tell you when data arrives.
The SDK writes its logs to the Unity player log, with the [Playtolia] prefix, at the logging level that you set in the Playtolia settings.
Overlay and input
The overlay sits above your game. While the overlay is visible, the SDK receives all mouse and keyboard events. To keep your game from also acting on them, usePlaytoliaDesktopOverlay (namespace Playtolia.Desktop):
For example, hide the overlay during a cutscene:
Keyboard in the SDK UI
- Escape goes back one screen. On the first screen of a sheet, it closes the sheet. The button that Escape triggers shows an
ESChint. - Tab moves the focus to the next field.
- Enter moves from the email field to the password field, and submits the sign-in and sign-up forms.
- Ctrl+A, Ctrl+C, Ctrl+X, Ctrl+V select all, copy, cut, and paste with the system clipboard.
- If the player holds Backspace, Delete, or an arrow key, the key repeats at the rate set in Windows.
Sign-in
Email and password sign-in, sign-up, and guest mode work as on mobile. Google sign-in opens in the default browser of the player. When the player finishes, the browser tab shows the name and icon of your game (from the Playtolia dashboard) and tells the player to return to the game. The game is then signed in and comes back to the front. You do not need to set up anything for this. Apple sign-in is not available on Windows. The SDK does not show the Apple button there.Stored data
The SDK keeps the session and cached data for each game in%LOCALAPPDATA%\Playtolia\games\<Game ID>\, so players stay signed in after they restart the game. The access and refresh tokens are encrypted with Windows DPAPI for the current Windows user. If a token cannot be decrypted (for example, the folder was copied from a different user or PC), the SDK signs the player out.
If you turn off persistence in the Playtolia settings, the SDK stores nothing on disk, and the player must sign in at each start.
Feature support
Windows has no PC store connection yet. A purchase on Windows fails with a “not available” result, so make sure that your store UI handles a failed purchase. Wallet balances and entitlements that the player got on another platform or from the server are visible on Windows.
Authentication
Sign-in providers and flows
Overlay UI
Configure the overlay button and screens