Unity integration
LauncherForge Launch Authentication validates whether a Unity build was started from an authorized Launcher Forge session. The integration can be used to restrict access to the game or specific features until the backend confirms the connection between the launcher and the executable.Understand launch tokens
How it works
Requirements
Before you begin, confirm that:- The game exists and is published in Launcher Forge.
- The game is linked to the launcher.
- You are using a Unity version compatible with the package.
- The project can use local packages.
- You know the validation endpoint URL.
- The final test will be performed with a published build started through Launcher Forge.
Unity installation
Download LauncherForge Launch Authentication 1.0.2

Install the package
The package can be installed by copying it into the project or by selecting itspackage.json file through Unity Package Manager.
- Copy into Packages
- Package Manager
Extract the archive
Rename the folder
Copy the package into the project
Packages:Verify the structure

Package copied into the Packages folder
Create the configuration
The package automatically loads its configuration fromResources.
Create the Resources folder
Assets, create:Create Launcher Auth Settings
Resources, use:Use the exact name
Verify the final path
Configure the backend
Select:Automatic initialization
Do not manually add the package to aGameObject.
When the game starts, the package automatically creates:
Available states
Import the namespace:Successful authentication
After successful validation, the user is available through:string:

Successful authentication in a build started through Launcher Forge
Check the current result
You can inspect the session state from any script that imports the namespace.Failed authentication
There is no property named:
Expected result when the build was not started through Launcher Forge
Use authentication events
This is the recommended approach for a main menu or controller that must react as soon as validation finishes.EvaluateCurrentState() is important because authentication may have finished before the object subscribed to the events.Behavior inside the Unity Editor
When you press Play directly in the editor, the expected result is an access-denied state. This does not indicate a package error. It confirms that:- Automatic initialization worked.
- The package attempted to retrieve the launch credential.
- The editor did not receive a credential generated by Launcher Forge.
LauncherAuthSession.Statechanged toLauncherAuthState.Failed.- The error message became available through
LauncherAuthSession.LastError.
Test real authentication
To verify the complete integration:Create a Unity build
Publish the build
Link the game
Install the game from the launcher
Start the build through Launcher Forge
Verify the result
AuthenticationSucceeded event should run.Failed authentication result
Validation may fail because of:- Missing credential.
- Invalid credential.
- Expired credential.
- Backend unavailable.
- Timeout.
- Invalid JSON response.
valid == false.- Empty or missing
id.
Troubleshooting
The package does not appear in Package Manager
The package does not appear in Package Manager
- The folder is named
com.launcherforge.launcherauth. package.jsonis located at the package root.- You selected the correct file through Install package from disk.
- The Unity version is compatible.
LauncherAuthSettings does not load
LauncherAuthSettings does not load
LauncherAuthSettings.The session remains Failed inside the Editor
The session remains Failed inside the Editor
The backend does not respond
The backend does not respond
Backend Url.- Backend availability.
- HTTPS certificate.
Timeout Secondsvalue.- Build connectivity.
The build opens but does not authenticate
The build opens but does not authenticate
- The build was published through the CLI.
- The game is linked to the correct launcher.
- The correct main executable was configured.
- The build was started through Launcher Forge.
- The configuration asset is included in
Resources.
License and sample project
Download UnityThirdPersonAuthTest

UnityThirdPersonAuthTest includes the package and a prepared integration for Unity 6 or another compatible version.Verification checklist
- The package is located at
Packages/com.launcherforge.launcherauth. - Package Manager displays LauncherForge Launch Authentication.
Assets/Resources/LauncherAuthSettings.assetexists.Backend Urlcontains the full endpoint.Startup Delay Secondsis set to0.5.Timeout Secondsis set to10.- You did not add a manual bootstrap component to a GameObject.
- The code imports
LauncherForge.LauncherAuth. - The menu uses events or evaluates the current state.
- The project handles both
AuthenticatedandFailed. - You do not attempt to enter a credential manually.
- The final test is performed with a linked build started through Launcher Forge.
AuthenticationSucceeded, exposes id, email, and valid, and your game correctly handles the Failed state.
