Skip to content

feat: Add support for file configurations#417

Open
kirre-bylund wants to merge 6 commits intodevfrom
feat/file-configuration
Open

feat: Add support for file configurations#417
kirre-bylund wants to merge 6 commits intodevfrom
feat/file-configuration

Conversation

@kirre-bylund
Copy link
Contributor

File Configurable SDK

This is the first step of the publisher package. What it does is it allows for a .bytes file to be automatically read by the SDK on boot. If it exists, then that file is used to set the LootLocker SDK configuration.

Solves issue: https://github.com/lootlocker/index/issues/1260

Changes

  • Added LootLockerExternalFileConfig as a json serializable version of LootLockerConfig
  • Made the "package name" of the SDK configurable
  • Prepended Logs with a configurable label
  • Made LootLockerConfig look in a predictable directory for a file config on start. If it exists, then that overrides configuration.
  • Removed LootLocker mentions in logs unless specifically needed for the log
  • Added encryption utilities
  • Restructured LootLockerConfig.cs a bit

Extra Features

  • On top of the strictly necessary features I added the ability to add an identifier in addition to the "package name" allowing for quick switching between multiple configurations in a simpler way.
  • Added very basic (just a deterrent) encryption of the config file so that it is not straight up readable from disk
  • Allowed for the config file to be either encrypted or not, both can be parsed

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for external file-based configuration of the LootLocker SDK, allowing settings to be loaded from a .bytes file at initialization. The implementation includes optional encryption for the configuration file and makes the SDK package name configurable.

Changes:

  • Introduced ExternalFileConfig class for JSON-serializable SDK configuration
  • Added encryption utilities for optional config file obfuscation
  • Refactored LootLockerConfig to check for and load external file configurations on initialization
  • Updated log messages throughout the SDK to remove hardcoded "LootLocker" references, making them more generic

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
Runtime/Game/Utilities/LootLockerEncryptionUtilities.cs Implements AES encryption/decryption utilities for config files
Runtime/Game/Utilities/LootLockerEncryptionUtilities.cs.meta Unity metadata for encryption utilities
Runtime/Game/Resources/LootLockerExternalFileConfig.cs Defines serializable external configuration structure
Runtime/Game/Resources/LootLockerExternalFileConfig.cs.meta Unity metadata for external config
Runtime/Game/Resources/LootLockerConfig.cs Refactored to support file-based configuration loading with encryption support
Runtime/Game/Requests/WhiteLabelRequest.cs Updated error messages to remove "LootLocker" prefix
Runtime/Game/LootLockerSDKManager.cs Updated log messages for generic SDK references
Runtime/Game/LootLockerLogger.cs Added configurable log label functionality
Runtime/Editor/LogViewer/LootLockerLogViewerUI.cs Updated to handle new log label format
Runtime/Editor/Editor UI/LootLockerAdminExtension.cs Fixed formatting spacing
Runtime/Client/LootLockerLifecycleManager.cs Updated initialization log message
Runtime/Client/LootLockerHTTPClient.cs Updated HTTP client log messages
Runtime/Client/LootLockerEventSystem.cs Updated event system log message

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@JohannesLoot JohannesLoot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only remark is the comment that I made, if that is intentional and I have missed some context, then merge away!

@kirre-bylund kirre-bylund force-pushed the feat/file-configuration branch from 9508b5e to fc57006 Compare February 25, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants