PatchSettings
Coding Style wiki
PatchSettings is the patch settings class (ScriptableObject) of AssetLoader. It centralizes global settings related to hot updates and asset packages — config file names, extensions, the cipher key, and output folder names — and is accessed at runtime through the static settings property.
| Namespace | OxGFrame.AssetLoader |
| Type | public class (inherits ScriptableObject) |
| Source | PatchSettings.cs |
using OxGFrame.AssetLoader;
Reminder A custom PatchSettings.asset can be created via the editor menu Assets → Create → OxGFrame → Create Settings → Create Patch Settings in Resources (it is created inside a Resources subfolder of the selected folder automatically); without the asset, the default values are used.
Properties
settings
public static PatchSettings settings { get; }
Returns
PatchSettings — the global settings instance (singleton).
Description
Gets the global settings instance. On first access, it loads the asset named PatchSettings from Resources; if the asset is not found, an instance with default values is created automatically (a log indicates that default settings are used).
Example
// Compose the full APP config file name (AppInfo.json by default)
string appCfgFileName = $"{PatchSettings.settings.appCfgName}{PatchSettings.settings.appCfgExtension}";
Fields
App Config Settings
| Name | Type | Default | Description |
|---|---|---|---|
| appCfgName | string | "AppInfo" | File name of the APP config. |
| appCfgExtension | string | ".json" | File extension of the APP config. |
Patch Config Settings
| Name | Type | Default | Description |
|---|---|---|---|
| patchCfgName | string | "PatchInfo" | File name of the patch config. |
| patchCfgExtension | string | ".json" | File extension of the patch config. |
Bundle URL Config Settings
| Name | Type | Default | Description |
|---|---|---|---|
| bundleUrlCfgCipher | byte | (not disclosed) | XOR cipher key of the deployment config (bundle request endpoints), used together with the CIPHER_HEADER file header. |
| bundleUrlCfgName | string | "CdnConfig" | File name of the deployment config (bundle request endpoints). |
| bundleUrlCfgExtension | string | ".dat" | File extension of the deployment config (bundle request endpoints). |
Folder Settings
| Name | Type | Default | Description |
|---|---|---|---|
| rootFolderName | string | "CDN" | Root folder name of the CDN output. |
| dlcFolderName | string | "DLC" | Subfolder name where DLC packages are stored. |
Attention Extension fields must include the dot (e.g., .dat, .cfg, .json).
Constants
| Constant | Type | Value | Description |
|---|---|---|---|
| CIPHER_HEADER | short | (not disclosed) | Cipher header mark of encrypted config files. The 2-byte header is written when the deployment config is encrypted, and detected on read to decide whether decryption is needed. |
| META_FILE_EXTENSION | string | ".meta" | META file extension. |
| APP_CFG_BAK_EXTENSION | string | ".bak" | Backup extension of the APP config. |
| PATCH_CFG_BAK_EXTENSION | string | ".bak" | Backup extension of the patch config. |
| BUNDLE_IP | string | "bundle_ip" | Key name of the bundle request endpoint in the deployment config. |
| BUNDLE_FALLBACK_IP | string | "bundle_fallback_ip" | Key name of the fallback bundle request endpoint in the deployment config. |
| STORE_LINK | string | "store_link" | Key name of the store link in the deployment config. |
Reminder BUNDLE_IP, BUNDLE_FALLBACK_IP, and STORE_LINK can be used as key parameters for BundleConfig.GetValueFromUrlCfg.