About • Installation • Configuration • Updating • Support • Development
LootLocker is a game backend-as-a-service that unlocks cross-platform systems so you can build, ship, and run your best games.
Full documentation is available here https://docs.lootlocker.com/
The preferred way of installing the LootLocker SDK is through Open UPM. This way you will receive future updates in a streamlined way. Please refer to OpenUPM for their simple install instructions or our official documentation.
Before you start you need to have git installed on your computer.
- In the Unity Editor go to
Window > Package Manager - Click the + at the top left of the Package Manager window
- Select
Add package from git URL... - Paste the following URL
https://github.com/LootLocker/unity-sdk.gitand clickAdd
For other methods, please refer to our official documentation.
For a full walkthrough of how to configure the SDK, please see our Guide to Configuring the Unity SDK. But here's a short explanation:
- Open the LootLocker Extension in Unity (Windows > LootLocker)
- Sign in with your LootLocker account
- Select your game, environment, and game key.
- Log on to the LootLocker management console and find your Game Settings.
- Find your Game Key in the API section of the settings
- Open
Edit > Project Settingsin the Unity Editor and find theLootLocker SDKtab. - Input Api Key using the Game Key from the LootLocker console page
You can keep several named config files in one project and switch between them without
recompiling. This is how you keep, for example, a dev config with verbose logging and a prod
config with logging off, or one config per platform.
Naming. Put the files next to the config asset, in
Assets/LootLockerSDK/Resources/Config/, and name them LootLockerConfig-<id>.bytes. The <id> may
contain letters, digits, ., _ and -, and must start with a letter or digit. The unsuffixed
LootLockerConfig.bytes keeps working exactly as before and is shown as Default.
Selecting. Open Edit > Project Settings > LootLocker SDK. When more than one config file is
present a Config File dropdown appears. Files that cannot be parsed, or that have no api_key,
are listed greyed out with the reason, so a broken file is visible but cannot be selected. With a
single config file there is nothing to choose and no dropdown is shown.
If you add config files and never pick one, the SDK uses the first in lexicographical order rather
than leaving file config unset. Adding files is an expression of intent, and a silent "no config"
is a confusing result. The choice is stable regardless of file system enumeration order, and the
dropdown reports which file auto-detect resolved to. Pick a specific file, or (None), to override
it.
Obfuscated configs. A config file may be plain JSON or an obfuscated payload — base64 of an
AES-encrypted JSON document, produced by LootLockerEncryptionUtilities.SimpleEncryptToBase64.
Discovery, the dropdown, and the load path all decrypt before parsing, so an obfuscated file is
classified and selectable exactly like a plain one, and plain and obfuscated profiles can be mixed
in the same project. A file that is valid base64 but not a payload this SDK produced is reported as
invalid with the decryption error, not as unreadable.
Local overrides. A shared config is the right place for team-wide values, but not for a one-off
change. Click the closed padlock next to a setting to write a local
Assets/LootLockerSDK/LocalOverrides/LootLockerConfig.local.bytes that is layered on top of the
selected config. The file is sparse: only the fields it contains are applied, so overriding
log_level leaves every other setting shared. Overridden settings are marked (local override) in
Project Settings, and the open padlock resets them. Switching config file also clears the file,
because an override written against one config does not apply to another.
The file is local and must not be committed. It is listed in the SDK's .gitignore, but the same
applies under any version control — add it to whatever ignore mechanism your team uses (Perforce,
Plastic SCM, SVN, and so on). The API and domain keys are deliberately not overridable: they
identify which game the project talks to, so a silent per-machine override would mean the settings
say one game and the build talks to another.
The override file is editor only, and deliberately outside Resources/. Anything under
Resources/ is packed into every build made on that machine, so an override stored there would ship
a local api_key or log_in_builds value to players even if the SDK never read it. It is a
developer convenience, not a build input.
CI. Select a config without touching the editor:
Unity.exe -batchmode -quit -lootlockerconfig prod-ps5
Unity.exe -batchmode -quit -lootlockerconfig none
An invalid identifier is logged as an error and treated as none rather than guessed at.
Precedence, highest first:
- An explicit
LootLockerSDKManager.Init(...)call. Process lifetime only; never written to disk. -lootlockerconfigon the command line.- The local override file (editor only).
- The selected config file.
- The legacy
LootLockerConfig.bytes. - The values stored in the config asset.
-lootlockerconfig none disables file config entirely, including the local override.
Only the selected config ships. Files under Resources/ are packed into the build and are
trivially readable from a shipped game, so "the SDK only reads one of them" is not key hygiene — the
others would still be in the build data. Before a build, every config file except the one in effect is
renamed with a trailing ~, which Unity ignores at import, and restored afterwards. The player reads
the surviving config through a generated LootLockerConfig.build.bytes pointer.
So a dev key on disk cannot end up in a prod build. What gets stripped is decided by the same
precedence as above, so -lootlockerconfig prod on a CI build strips everything else.
Two things to know:
- During a build, your version control client briefly shows the other configs as renamed. Restore is automatic.
- If the editor is killed mid-build, the files stay hidden until the next editor start, which restores them automatically. Nothing is lost — the files are renamed, not deleted.
Two limitations worth knowing:
- The selection is a single committed value, so it is shared by everyone on the project. Per-build target selection is not implemented yet.
- API keys in config files are not secrets. They are readable by anyone with the build. This feature improves key hygiene — keeping the right key on the right target — not secrecy.
If you have installed the SDK from Open UPM then all you have to do in Package Manager is press the Update button when that tells you there's a new version.
For other install methods and more information, head over to our official documentation.
The SDK ships a link.xml at the package root that preserves the types and members it reaches through reflection when deserializing server responses. The Unity linker only reads link.xml files that live under your project's Assets/ folder, so the SDK registers its own file with the linker through an IUnityLinkerProcessor (Runtime/Editor/LootLockerLinkXmlProcessor.cs). This happens automatically — no setup required.
If you enable Managed Stripping Level (Medium or High) in Player Settings, do not delete the package's link.xml or the processor. Without them, responses deserialize into non-null objects whose members are all default values, which fails silently rather than throwing.
If you need to add preservations for your own types, put them in a separate link.xml under your project's Assets/ folder. Multiple link.xml files are supported and are merged by the Unity linker.
If you have any issues or just wanna chat you can reach us on our Discord Server
To set up the tests, you must add our package to the manifest.json testables underneath dependencies. Your manifest.json should look something like this:
{
"dependencies": {
"com.lootlocker.lootlockersdk": "https://github.com/lootlocker/unity-sdk.git",
many more dependencies...
},
"testables": ["com.lootlocker.lootlockersdk"]
}Once you have done this, you can go into Unity and go to Window -> General -> Test Runner. This will open a new window which should already include all the tests available, Then all you have to do is press Run All and the tests will begin.
If you are running the tests towards the LootLocker production environment you will need to provide a username and password to an existing user either by setting the values directly in LootLockerTestConfigurationUser::GetProductionUser or via command line arguments -adminemail and -adminpassword. Bear in mind that your tests will be rate limited when running towards production (and in general this is a bad idea).
