API Reference
Complete reference for all public classes and methods in the OZeroSecurity SDK. All classes live in the OZeroSDK.Security namespace unless otherwise noted.
OZeroSecurityManager OZeroSDK.Security
The global manager that handles all active security modules and security events. Survives scene transitions and can be accessed via the Instance property. The SDK creates it automatically at app startup, so you do not need to instantiate it manually.
Properties
| Name | Type | Description |
|---|---|---|
| Instance | OZeroSecurityManager | Static singleton accessor. Returns the active instance. |
Methods
Registers a callback so your project can react to security events. OZero's built-in response still runs separately, so registering or removing this callback does not turn protection off. The callback receives an OZeroSecurityEvent with the detected area, public abort code, message key, diagnostic message, and whether the app is scheduled to close.
Removes a previously registered user callback. Always call this in OnDisable or OnDestroy to prevent memory leaks.
Registers the project callback used by CustomCallbackOnly. It runs only after native code has armed an irreversible fatal-exit deadline. The callback may show a notice or perform brief cleanup, but cannot cancel or extend that deadline.
Removes a previously registered security termination notice callback.
Immediately completes an already-pending fatal security exit, typically from a notice dialog's OK button. It does nothing when no fatal exit is pending.
Registers a callback for server-issued policy actions delivered by the Pro device policy heartbeat. Use this for portal policies such as Callback responses. It is separate from local security detection callbacks.
Removes a previously registered policy action callback. Register in OnEnable and unregister in OnDisable when using a scene object.
Registers a callback for user-facing activation or DRM state changes. With OZero-managed Steam DRM and the default Managed Verification UI, the SDK already shows the online-required, retry, timeout, and blocked states; register this only for custom UI, telemetry, or a game-specific session gate.
Removes a previously registered activation state callback. Register in OnEnable and unregister in OnDisable when using a scene object.
Registers a callback for the shared OZero Managed Verification state used by Pro Build Integrity and Steam DRM. The default SDK UI handles these states automatically when enabled; use this callback only for custom UI, custom telemetry, or game-specific session gates.
Removes a previously registered managed verification state callback. Register in OnEnable and unregister in OnDisable when using a scene object.
Replaces individual built-in verification UI strings at runtime. Use JSON files under Assets/OZeroSDK/Resources/OZeroLocalization for normal localization, and use this provider only when text must be supplied dynamically.
Removes a previously registered managed verification text provider.
Retries SDK-managed Build Integrity attestation after an online-required or retry-timeout state. The default Managed Verification UI calls this automatically. If your own game server validates OZA tokens, retry your own login or session-refresh request instead.
Retries OZero-server-managed Steam Activation / DRM verification. The default Managed Verification UI calls the matching retry flow for you. Call this from game code only when you intentionally replace the default UI; if your own game server performs Steam verification, retry your own login or session request instead.
Delegate
The callback signature used by RegisterUserCallback. Use evt.Type, evt.AbortCodeHex, evt.MessageKey, evt.Message, and evt.WillAbort when you need a warning UI, your own server log, or a short save step. If evt.WillAbort is true, keep the work brief because the app is already scheduled to close.
Example
using OZeroSDK.Security;
using UnityEngine;
public class MySecurityListener : MonoBehaviour
{
void OnEnable()
=> OZeroSecurityManager.Instance.RegisterUserCallback(OnThreat);
void OnDisable()
=> OZeroSecurityManager.Instance.UnregisterUserCallback(OnThreat);
void OnThreat(OZeroSecurityEvent evt)
=> Debug.Log(
$"Threat={evt.Type}, Code={evt.AbortCodeHex}, Message={evt.Message}");
}
OZeroSecurityTerminationNoticeEvent class
User-facing payload emitted only after the native fatal-exit deadline is armed. It wraps the original safe security event and a stable support code suitable for a dialog or customer-support report.
| Name | Type | Description |
|---|---|---|
| SecurityEvent | OZeroSecurityEvent | The original safe event. WillAbort is true; use AbortCode and MessageKey for logs and localization. |
| SupportCode | string | Stable, non-sensitive code that the player can report to customer support. |
Showing UI or invoking a callback does not pause, cancel, or extend the native fatal-exit deadline. Keep all work bounded and call
OZeroSecurityManager.ExitNow() only to exit earlier.OZeroSecurityEvent class
Customer-facing violation event passed to RegisterUserCallback. It intentionally exposes only stable, safe diagnostic info rather than internal detection details.
| Name | Type | Description |
|---|---|---|
| Type | ModulationType | Security module that raised the violation. |
| AbortCode | OZeroAbortCode | Stable public abort code category. |
| AbortCodeValue | int | Numeric code value, useful for server logs. |
| AbortCodeHex | string | Hex string such as 0x0C. |
| MessageKey | string | Stable English message key for localization and analytics grouping. |
| Message | string | Safe customer-facing English diagnostic message. |
| WillAbort | bool | True when the current response policy will terminate the app after callbacks return or the grace timer expires. |
OZeroPolicyActionEvent class
Server policy callback payload passed to RegisterUserPolicyActionCallback. These events are issued by the customer portal policy system and delivered on the Unity main thread through the Pro device policy heartbeat.
| Name | Type | Description |
|---|---|---|
| Module | string | Policy module such as variant, injection, or physics. |
| ActionId | string | Unique delivery id. The SDK uses it to avoid duplicate dispatch and acknowledge delivery. |
| PolicyId | string | Customer portal policy id when available. |
| Reason | string | Reason configured by the policy or generated from the matched evidence. |
| Score | int | Risk score at the time the policy matched. |
| EventCount | int | Number of events that contributed to the policy match. |
| WindowMinutes | int | Policy evaluation window in minutes. |
| IssuedAtUnixMs | long | Server UTC epoch milliseconds when the action was issued. |
| ExpiresAtUnixMs | long | Server UTC epoch milliseconds when the pending action expires if it is not acknowledged. |
Policy callback example
Use this when a Customer Portal security policy is configured as Callback. The SDK delivers the policy action to the game, and your game decides how to notify, restrict, or move the user.
using OZeroSDK.Security;
using UnityEngine;
public sealed class OZeroPolicyListener : MonoBehaviour
{
private void OnEnable()
=> OZeroSecurityManager.Instance.RegisterUserPolicyActionCallback(OnPolicyAction);
private void OnDisable()
=> OZeroSecurityManager.Instance.UnregisterUserPolicyActionCallback(OnPolicyAction);
private void OnPolicyAction(OZeroPolicyActionEvent evt)
{
Debug.LogWarning($"Policy={evt.PolicyId}, Module={evt.Module}, Score={evt.Score}, Reason={evt.Reason}");
if (evt.Score >= 80)
{
ShowSecurityNotice(evt.Reason);
DisableRankedMatchmaking();
}
}
}
OZeroUserActivationStateEvent class
User-facing activation or DRM state payload passed to RegisterUserActivationStateCallback. Steam Activation / DRM uses it to tell the game whether cached offline play is still allowed or online revalidation is required.
| Name | Type | Description |
|---|---|---|
| Provider | string | Activation provider such as steam. |
| State | string | Stable state such as valid, revalidated, online_required, offline_degraded, or rejected. |
| Reason | string | Reason code such as steam_activation_revalidate_unavailable or steam_activation_cache_expired. |
| Action | string | Portal policy action value associated with this state when available. |
| OfflineAllowed | bool | True only while a verified signed token is inside its offline allowance. |
| OnlineRequired | bool | True when the game should ask the user to reconnect before allowing the protected session. |
| RefreshAtUnixMs | long | UTC epoch milliseconds when online refresh is required. |
| OfflineUntilUnixMs | long | UTC epoch milliseconds when the signed offline allowance ends. |
Activation state callback usage
For OZero-managed Steam DRM with the default Managed Verification UI, no activation callback code is required; the SDK shows online-required, retry, timeout, and blocked states for the player. Register this callback only when you intentionally replace the default UI, add your own session gate, or operate a customer game-server verification flow. Do not put Steam Web API keys or OZero server API keys in the client.
OZeroUserManagedVerificationStateEvent class
User-facing managed verification payload passed to RegisterUserManagedVerificationStateCallback. Build Integrity and Steam DRM both use this event, but the default Managed Verification UI consumes it automatically. Handle it in game code only for custom UI, custom telemetry, or a game-specific session gate.
| Name | Type | Description |
|---|---|---|
| Provider | OZeroManagedVerificationProvider | Source module: BuildIntegrity or SteamDrm. |
| State | OZeroUserManagedVerificationState | Current state such as Checking, Allowed, Warning, OnlineRequired, RetryTimedOut, Blocked, or StandardFallback. |
| Reason | string | Stable reason code suitable for custom UI text, analytics, or customer support logs. |
| Verdict | string | Server verdict when available, such as allow, warn, block, or fallback. |
| CanRetry | bool | True when a Retry action is meaningful for the current provider and state. |
| TimestampUnixMs | long | UTC epoch milliseconds when the state was raised. |
Managed verification callback usage
When managedVerificationUiPolicy uses an OZero built-in dialog, the SDK already handles Build Integrity and Steam DRM managed-verification UI, retry, and timeout states. Register RegisterUserManagedVerificationStateCallback only for Custom UI / Callback Only, additional telemetry, or a game-specific session gate. In custom UI mode, call the retry method that matches Provider; in customer game-server mode, retry your own login or session request instead.
OZeroManagedVerificationUiPolicy enum
Controls how the SDK presents managed verification states from Build Integrity and Steam DRM to the player. Both built-in policies require TextMeshPro, TMP Essential Resources, and the optional OZero Built-In TMP Dialog package. Build preflight stops the player build when a built-in policy is selected without those prerequisites; use Window > OZero Security > Check Setup and its Import Package action to fix the project.
| Value | Description |
|---|---|
| CustomCallbackOnly | The SDK raises RegisterUserManagedVerificationStateCallback states only. Use this when the game implements its own UI, retry buttons, timeout handling, and session gate. |
| BuiltInBlockingDialog | Uses the OZero built-in blocking dialog. This is the recommended default for release builds that should pause or block the protected session while online revalidation is required. |
| BuiltInNonBlockingDialog | Uses the OZero built-in non-blocking notice. Use this only when gameplay can continue safely while the player is guided through retry or warning states. |
OZeroSecurityTerminationNoticePolicy enum
Controls the optional user-facing notice shown immediately before an already-armed fatal security exit. This common policy is available to Standard / Pro licenses.
| Value | Description |
|---|---|
| Disabled = 0 | Shows no termination notice. The native fatal-exit deadline remains authoritative. |
| OZeroBuiltIn = 1 | Shows the localized OZero built-in dialog and exits early when the player confirms. |
| CustomCallbackOnly = 2 | Invokes the registered termination notice callback so the project can show custom UI. It cannot cancel or extend termination. |
OZeroManagedVerificationTimeoutAction enum
Controls what the built-in managed verification UI does when online-required or retry states are not resolved within the configured timeout.
| Value | Description |
|---|---|
| KeepDialog | Keeps the dialog visible after timeout. Choose this only when the game wants the player to keep retrying manually. |
| BlockSession | Blocks the protected session after timeout. This is the recommended default when online verification is mandatory but the application should remain open. |
| AbortApplication | Terminates the application after timeout. Use only when your release policy requires immediate exit on unresolved verification. |
| InvokeCallbackOnly | Raises callbacks without built-in blocking or exit behavior. Use this for fully custom session control. |
ModulationType enum
Identifies which security module raised an alert. Passed via OZeroSecurityEvent.Type.
| Value | Description |
|---|---|
| MemoryModulation | A Secure Type variable is accessed in a suspicious way |
| SpeedHack | Speed hack or time manipulation detected |
| TimeHack | System clock anomaly detected (backward jump, NTP mismatch) |
| Injection | Memory injection tool (e.g. Frida) or illegal DLL detected |
| PhysicsHack | Impossible position delta detected (fired by OZeroPhysicsHackDetector — you must attach the component directly to player objects and initialize it) |
| DeviceBindingModulation | Save data loaded on a device that doesn't match the binding |
| InstallSource | App was not installed from an authorized store |
| BuildIntegrity | Assembly hash mismatch, debugger attached, or platform check failed |
| EnvironmentModulation | Emulator or non-standard runtime environment detected |
| SteamAntiPiracy | Steam ownership or ticket validation failed. |
| InjectionScannerUnavailable | The native injection scanner could not run (fail-closed; abort code 0x15, not an attack detection) |
OZeroBootstrapper OZeroSDK.Security
The automatic startup entry point responsible for initializing the SDK. You do not need to call this directly in your project code. It loads security settings in alignment with the Unity startup flow and prepares active detectors before the game starts.
OZeroSecurityConfig asset.
OZeroSecurityConfigRuntime OZeroSDK.Security
A configuration loader that reads and validates protected build settings when the player runs. It validates the packaged configuration, prepares an in-memory OZeroSecurityConfig snapshot, and applies the configured threat-response policy if validation fails.
Properties
| Name | Type | Description |
|---|---|---|
| Current | OZeroSecurityConfig | The configuration snapshot created by reading the protected settings included in the player build. Calls EnsureLoaded() on first access. |
Methods
A loader that is safe to call repeatedly. First call validates and loads the packaged configuration; later calls reuse the same configuration snapshot. Failure handling follows the configured response policy.
OZeroSecurityConfig and the Unity editor window as the supported integration surface.
OZero Secure Variables OZeroSDK.Security
Encrypted types that can be used instead of regular numeric, string, and vector types. Values are stored in a protected memory area and support most arithmetic operators and implicit conversions. You can apply them to existing code simply by changing the type name.
Available types
| Class | Replaces |
|---|---|
| OZeroSV_Int | int |
| OZeroSV_Int64 | long |
| OZeroSV_UInt | uint |
| OZeroSV_UInt64 | ulong |
| OZeroSV_Short | short |
| OZeroSV_UShort | ushort |
| OZeroSV_Byte | byte |
| OZeroSV_Float | float |
| OZeroSV_Double | double |
| OZeroSV_Decimal | decimal |
| OZeroSV_Bool | bool |
| OZeroSV_String | string |
| OZeroSV_Vector2 | Vector2 |
| OZeroSV_Vector3 | Vector3 |
| OZeroSV_Buffer | byte[] |
Supported operators
Numeric types (Int, Int64, UInt, UInt64, Short, UShort, Byte, Float, Double, Decimal) support arithmetic (+ - * / %), comparison (== != < > <= >=), compound assignment (+= -= *= /=), increment/decrement (++ --) operators, and implicit conversions with their primitive equivalents. Vector2 and Vector3 support arithmetic and equality operators. Bool supports equality operators only. String supports ==, !=, and +. Buffer provides direct byte array access via index operators.
OZeroSafePlayerPrefs OZeroSDK.Security
An encrypted storage that can be used similarly to Unity's PlayerPrefs. Key names and values are protected, making it difficult to read the original values even if you open the Windows registry or iOS settings file directly.
Methods
The common PlayerPrefs-style methods are available, plus Int64, Double, Bool, and IncrementInt helpers. Existing plain PlayerPrefs values are not migrated automatically; start using OZeroSafePlayerPrefs for keys you want protected going forward.
OZeroSafePlayerPrefs is not compatible with standard PlayerPrefs. If you switch between the two, existing data will not be readable.
OZeroSV_File OZeroSDK.Security
Protects file reads and writes with internal encryption logic. Because it does not use a device binding key, it can be used when the same save file needs to be read across multiple devices, like Steam Cloud Save. If a file is intentionally tampered with, the integrity check fails at read time and throws an InvalidDataException.
OZeroSV_File API.
Methods
Encrypts contents and stores it at path. Parent folders are not created automatically, so call Directory.CreateDirectory first when needed.
Reads the file at path, verifies integrity, and returns the decrypted string. If the file was tampered with, InvalidDataException is thrown.
Encrypts data and stores it safely at path.
Reads the file specified at path. Verifies file integrity during read and detects any tampering.
Decrypts an encrypted byte buffer that is already loaded in memory instead of a file path. Use this when you cannot pass data received from a remote download or custom storage to ReadAllText.
Example
using OZeroSDK.Security;
string path = Application.persistentDataPath + "/save.json";
string json = JsonUtility.ToJson(saveData);
// Write (encrypts automatically)
OZeroSV_File.WriteAllText(path, json);
// Read (decrypts + integrity check)
try
{
string loaded = OZeroSV_File.ReadAllText(path);
saveData = JsonUtility.FromJson<SaveData>(loaded);
}
catch (System.IO.InvalidDataException)
{
// File was tampered — handle accordingly
Debug.LogError("Save file integrity check failed.");
}
OZeroBuildIntegrityValidator OZeroSDK.Security
Runtime validator for build tampering, debugger/timing anomalies, platform-native integrity checks, optional Pro server attestation, and OZero Managed Verification. The component is created automatically by the SDK when Build Integrity is enabled in OZeroSecurityConfig.
What it checks
| Check | Description |
|---|---|
| Assembly / Manifest | Verifies the generated integrity manifest and managed assembly state on supported build targets. |
| Debugger / Timing | Detects attached debuggers, abnormal timing gaps, and breakpoint-like pauses while suppressing common focus-loss false positives. |
| Platform Native | Runs platform-specific integrity checks such as Android package/signature checks, iOS jailbreak checks, and desktop runtime checks when enabled. |
| Pro Attestation | When Pro server attestation is enabled, requests a server-issued attestation token after local checks pass. If you don't have your own game server, the OZero server can also return an allow/warn/block verdict. |
Public properties
| Name | Type | Description |
|---|---|---|
| Instance | OZeroBuildIntegrityValidator | Current validator instance, if the module has been created. |
| LastValidationResult | bool? | Most recent local validation result. null before the first validation run. |
| IsValidating | bool | True while a validation run is in progress. |
| IsIntegrityVerified | bool | True after the latest enabled local checks pass. |
| AttestationToken | OZeroBuildAttestationToken | Most recent Pro attestation token. Null until server attestation succeeds or fails. The token includes a unique token ID for replay tracking. |
Events and methods
Invoked when all enabled local checks pass.
Invoked when an enabled local check or Pro attestation rejects the build.
Invoked after Pro server attestation succeeds and AttestationToken contains a valid token.
CustomerGameServer only. After local checks pass, starts attestation with a server-issued audience, 64-character challenge hex, and session ID. Send the callback's OZA token and exact binding values to the game server for /v1/validate. Returns false for invalid configuration or binding, or while validation is busy.
Starts a manual validation run. Normal projects should preferably rely on the dashboard's startup and periodic validation settings.
OZeroBuildAttestationToken
Pro attestation result. Send AttestToken to your game server and call IsValid(nowMillis) to check validity before using it for login, PvP, ranking, or currency flows.
Returns true after the server-issued expiry time.
Returns true when the token was issued successfully and has not expired.
OZeroSpeedHackDetector OZeroSDK.Security
Detects speed hacks and time manipulation using five independent detection signals. A threat is reported only when signals confirm each other, reducing false positives.
Detection signals
| Signal | Description |
|---|---|
| TimeScale | Checks if the game's time flow changes abnormally |
| API Clock | Compares platform time against a native reference time to detect large discrepancies |
| Thread Drift | Observes drift between Unity runtime time and a native reference time |
| Time Backward | Detects situations where the device time abnormally goes backwards |
| NTP | Optional — cross-checks with a reliable external time reference (requires network) |
Detection fires via OZeroSecurityManager callbacks with ModulationType.SpeedHack or ModulationType.TimeHack. Configured in OZeroSecurityConfig.
OZeroWatchdog OZeroSDK.Security
Public helper for trusted long-running loading work. It temporarily defers the native Watchdog heartbeat deadline around synchronous work that can legitimately block Unity's main thread longer than the release deadline.
Methods
Starts a bounded loading grace scope. Call End() or dispose the returned scope as soon as trusted loading work finishes. Nested scopes are supported; normal Watchdog timing resumes when the last scope ends.
Ends this loading grace scope manually. Dispose() calls the same logic, so using blocks and explicit End() are equivalent.
Convenience wrapper for synchronous loading work. It creates a loading grace scope, runs work, and ends the scope in a finally-safe using block.
Example
using OZeroSDK.Security;
using UnityEngine.SceneManagement;
public void LoadLargeScene()
{
using (OZeroWatchdog.BeginLoadingGrace(60000))
{
SceneManager.LoadScene("Battle", LoadSceneMode.Single);
}
}
OZeroInjectionDetector OZeroSDK.Security
Checks if suspicious modules are attached to the running game, or if there are traces of hooking or debuggers. Periodic checks use slight timing variations when possible to make simple bypass attempts more difficult.
What it detects
| Runtime module | Unexpected runtime modules or signals suspected of hooking |
| Debugger | Signals suspected of debugger or tracing tool attachment |
| Memory map | Abnormal runtime memory or module state signals |
| Illegal DLL | Unauthorized managed assembly signals loaded into the process (Windows/Unity Editor) |
Detection fires via OZeroSecurityManager callbacks with ModulationType.Injection.
OZeroSteamAntiPiracy OZeroSDK.Security
Runtime API to change the post-detection action of Steam Anti-Piracy. Setting this up in the Config Dashboard is sufficient for most projects. Only use this if you provide an admin menu or QA switch directly inside the game.
OZeroSteamDetectionAction
| Value | Description |
|---|---|
| Off | Do not apply the local Steam Anti-Piracy response. Use only in restricted troubleshooting situations. |
| Observe | Record diagnostic information only and allow the game execution to continue. |
| Callback | Raises OZeroSecurityManager callbacks so the game can show UI, log, or handle it independently. This option alone does not auto-terminate the app; the actual termination depends on the Global Threat Response settings and your project's callback handling. |
| Block | Treat the violation as a block policy. Actual app termination follows the Global Threat Response settings. |
Methods
Overrides the local Steam Anti-Piracy detection action at runtime. Used when temporarily lowering to Observe in QA builds, or letting operators select specific actions from an admin menu.
Clears the runtime override and reverts to the default action set in OZeroSecurityConfig or the Pro portal.
Example
using OZeroSDK.Security;
// QA session: observe Steam violations without blocking gameplay.
OZeroSteamAntiPiracy.SetDetectionActionOverride(
OZeroSteamDetectionAction.Observe);
// Restore the dashboard/server policy.
OZeroSteamAntiPiracy.ClearDetectionActionOverride();
Last result
Returns the most recent Steam validation snapshot. Includes reported AppID, BuildID, SteamID, server verification state, soft signal, and native score fields. Can be used for debug UI or QA reports, but do not use it as the sole criterion for gameplay authorization.
OZeroInstallSourceValidator OZeroSDK.Security
Android install-source validator. The component is created automatically when Install Source is enabled. Customer code usually reads the last result for support UI, diagnostic logs, or store-specific branching.
Methods and event
Invoked when the install source is resolved.
Returns the cached result from the most recent check.
Performs initialization if necessary, then returns the Android installation source result.
InstallSourceResult
| DetectedSource | Resolved source as an AndroidInstallSource enum value. |
| RawInstallerPackage | Raw Android installer package name returned by PackageManager. |
| IsAuthorized | True when the local config and, if enabled, Pro server policy allow this install source. |
| ServerVerified | Pro only. True when the server verification call has completed. |
| ServerAuthorized | Pro only. Server-side authorization decision when ServerVerified is true. |
AndroidInstallSource
Exact enum values returned by InstallSourceResult.DetectedSource. Store names in the manual are friendly labels; code should compare against these enum names.
| Value | Description |
|---|---|
| GooglePlayStore | Installed from Google Play Store. |
| SamsungGalaxyStore | Installed from Samsung Galaxy Store. |
| AmazonAppstore | Installed from Amazon Appstore. |
| HuaweiAppGallery | Installed from Huawei AppGallery. |
| OneStore | Installed from ONE Store. |
| XiaomiGetApps | Installed from Xiaomi GetApps. |
| OppoAppMarket | Installed from OPPO App Market. |
| VivoAppStore | Installed from Vivo App Store. |
| Custom | Raw installer package matched customAuthorizedPackages. |
| ADB | Android returned an empty installer package, usually from ADB or sideload-style installation. |
| DetectionFailed | The installer query itself failed because JNI or the platform API was unavailable. This is different from ADB. |
| Unknown | Android returned a package name that is neither built-in nor custom-authorized. |
| Editor | Returned while running inside the Unity Editor. |
| NotApplicable | Returned on platforms where Android installer source does not apply. |
OZeroDeviceBindingDetector OZeroSDK.Security
Helper API for device-bound save slots and support reset flows. The detector starts automatically when Device Binding is enabled. Call these token methods only when your game wants to bind a cloud save, account save slot, or similar data to the current device.
Methods
Prepares the local device fingerprint, then registers or validates it. In normal projects this is called automatically during SDK startup.
Creates a token that links a save-slot key to the current device. Store the token with your save metadata or server record, not inside a player-editable save body.
Checks whether the stored save-slot token matches the current device. If it does not match, the SDK raises the configured Device Binding violation response.
Debug/demo helper that returns the current device fingerprint hash. Do not show, upload, or store this value from production gameplay code.
Clears the fingerprint stored on this device. In non-Editor builds, pass a server-issued Reset Token and use it only for legitimate support reset flows.
Example
using OZeroSDK.Security;
var detector = OZeroDeviceBindingDetector.Instance;
string slotKey = "account:1234:slot:main";
string token = detector.BindToSaveSlot(slotKey);
// Store token next to your save metadata.
bool ok = detector.ValidateSaveSlot(slotKey, token);
OZeroSecurityConfig ScriptableObject
A Unity ScriptableObject asset that stores the default settings for OZero security modules. Changes made in the Config Dashboard or Inspector are included as protection settings for players during build. Use OZeroSecurityConfig.Instance when you need to check the current settings in code.
Fields
Fields are grouped into nested settings classes such as Response and Integrity. This table lists the fields most often checked from code or changed during integration; see the manual for the full Inspector table. Defaults mean the serialized values defined in code. Rows marked with * are forced to a different runtime value in release builds.
| Field | Type | Default | Description |
|---|---|---|---|
| — Top-level — | |||
| developerSecret | string | "" | Project-specific secret used to protect OZeroSV_File and OZeroSafePlayerPrefs data. Generate it with Generate Secure Secret in the Config Dashboard before the first release, and do not change it after launch. If it changes, existing protected data cannot be decrypted by newer builds. |
| enableLog | bool | true | Enables SDK debug logs. Useful for development and QA investigation, but review your release logging policy separately. |
| enableFailureDiagnostics | bool | false | Writes local security failure diagnostic files to Application.persistentDataPath. Enable only during QA or customer-support investigation, then turn it off again. |
| — Response — | |||
| response.forceQuitOnDetection | bool | true | Decides whether the app should close automatically when a threat is confirmed. During QA you can turn this off and observe events only, but choose a clear policy for release builds according to your project's guidelines. |
| response.fatalCallbackGraceSeconds | float | 10 | Maximum seconds allowed for your security callback UI to notify the player after a threat is detected. Set to 0 only when immediate exit is intended. |
| securityTerminationNoticePolicy | OZeroSecurityTerminationNoticePolicy | Disabled | Optional all-license notice policy for an already-pending fatal security exit. |
| securityUiDialogPrefabResourcePath | string | "" | Optional Resources path for the shared security UI prefab. Leave empty to use the SDK default. |
| securityUiLanguageCode | string | auto | Language code for shared security UI strings. auto follows Application.systemLanguage. |
| securityUiFallbackLanguageCode | string | en | Fallback language when the selected shared localization JSON is missing. |
| — Managed Verification UI — | |||
| managedVerificationUiPolicy (Pro) | OZeroManagedVerificationUiPolicy | BuiltInBlockingDialog | Chooses the user-facing flow for OZero Managed Build Integrity and Steam DRM states. Built-in modes let the SDK handle nonce/attest, managed session verification, online-required notices, retry, and timeout UI. Use Custom UI / Callback Only only when replacing the SDK dialog. |
| managedVerificationRetryTimeoutSeconds (Pro) | int | 15 | Maximum seconds to wait after the player presses Retry before reporting a retry timeout. |
| managedVerificationOnlineRequiredTimeoutSeconds (Pro) | int | 120 | Maximum seconds to keep the online-required state waiting before applying the configured timeout action. |
| managedVerificationTimeoutAction (Pro) | OZeroManagedVerificationTimeoutAction | BlockSession | Chooses whether a timeout keeps the dialog open, blocks the protected session, aborts the app, or only invokes callbacks. |
| autoRetryManagedVerificationWhenNetworkRestored (Pro) | bool | false | Automatically retries managed verification when network connectivity is restored. Enable only when the game can safely retry without an explicit player action. |
| — Integrity — | |||
| integrity.useIntegrity | bool | true | Master switch for the Build Integrity module. |
| integrity.validateOnStartup | bool | true | Run the full integrity check at Start(). |
| integrity.periodicCheckInterval | float | 300 | Interval in seconds between recurring re-validation runs. Code default is 300. Set ≤ 0 to disable periodic checks. |
| integrity.checkAssemblyHash | bool | true | SHA-256 / public-key-token verification of compiled assemblies against the OZeroAssemblyManifest. |
| integrity.checkDebugger | bool | true | Detect attached managed debuggers, Unity debug-build flags, and CPU timing anomalies. |
| integrity.checkPlatformNative | bool | true | Run platform-specific native checks (Root, Jailbreak, APK signature, Authenticode, etc.). |
| integrity.failIfManifestMissing | bool | false* | Treat a missing or unloadable manifest as a violation. *Forced to true in non-development player builds regardless of the serialized value. |
| integrity.failIfAssemblyHashBlobMissing | bool | false* | Treat a missing generated assembly-hash blob as a violation. *Forced to true in non-development player builds. |
| integrity.requireManifestSignature | bool | false* | Require a valid signature on the manifest. Generate keys from Window → OZero Security → Config & Dashboard with Generate Key Pair. *Forced to true in release player builds. |
| integrity.il2cppHashGlobalGameManagers | bool | false | Include globalgamemanagers in Windows IL2CPP file hashing. Standard and Strict presets turn this on. |
| integrity.il2cppHashSharedAssets | bool | false | Include sharedassets* files in Windows IL2CPP file hashing. Standard and Strict presets turn this on. |
| integrity.il2cppHashSceneFiles | bool | false | Include Unity scene files such as level* in Windows IL2CPP file hashing. Standard and Strict presets turn this on. |
| integrity.blockEmulator | bool | true | (Android) Treat emulator detection as an integrity violation. |
| integrity.checkIntegrityWithServer (Pro) | bool | false | Enables the Pro nonce → attest flow. With OZero Managed and a built-in Managed Verification UI, the SDK submits build integrity evidence, requests the managed session verdict, and handles player-facing retry/timeout states without game code. |
| integrity.attestationVerificationMode (Pro) | enum | CustomerGameServer | Choose whether OZero Managed returns the verdict, or your game server issues the binding and validates the OZA token after the client calls RequestGameServerAttestation(...). |
| integrity.attestationNetworkPolicy (Pro) | enum | RequireOnlineRevalidation | Server verification that cannot be completed or refreshed surfaces an online-required retry state. Built-in Managed Verification UI modes show this state automatically. |
| — InstallSource (Android) — | |||
| installSource.useInstallSource | bool | true | Master switch for the install-source validator. |
| installSource.allowGooglePlayStore | bool | true | Allow installs from Google Play (toggle individual store flags for Galaxy Store, Amazon Appstore, AppGallery, OneStore, etc.). |
| installSource.enableServerSync (Pro) | bool | false | Calls /v1/install-source/verify after local detection so the Pro server can apply a managed allowlist and record audit data. |
| installSource.allowDetectionFailed | bool | false | Allows startup when the Android installer query itself fails. Keep disabled for release unless you have a tested device-specific reason. |
| installSource.allowUnknownSources | bool | false | Allows installer package names that are not built-in and not listed in customAuthorizedPackages. |
| — Steam Anti-Piracy — | |||
| steamAntiPiracy.useSteamAntiPiracy | bool | false | Master switch for Steam launch, entitlement, DLC, and release-hygiene checks. |
| steamAntiPiracy.detectionAction | OZeroSteamDetectionAction | Callback | Local response used when Steam validation fails. Pro policies may override this value. |
| steamAntiPiracy.checkSteamDrmWithServer (Pro) | bool | false | Enables server-backed Steam DRM verification. With OZero Managed and a built-in Managed Verification UI, the SDK handles Steam ticket submission, activation token cache, online-required UI, retry, and timeout states. |
| steamAntiPiracy.steamDrmVerificationMode (Pro) | enum | OZero Managed | Chooses OZero-managed verification or customer game-server verification. OZero Managed is the no-backend path when paired with the default Managed Verification UI. |
| steamAntiPiracy.steamDrmNetworkPolicy (Pro) | enum | RequireOnlineRevalidation | Required Steam DRM revalidation that cannot reach the server enters the online-required state. Built-in Managed Verification UI modes show the retry flow automatically. |
| — DeviceBinding — | |||
| deviceBinding.useDeviceBinding | bool | true | Turns on Device Binding validation during SDK startup. |
| deviceBinding.hardwareChangeTolerance | int (0–3) | 1 | How many fingerprint components may change while still treating the device as the same device. |
| deviceBinding.enableServerSync (Pro) | bool | false | Pro only. Registers and verifies the device fingerprint through /v1/device/register and /v1/device/verify. Network failures are fail-open, while explicit server rejections become Device Binding violations. |
| deviceBinding.maxDevices (Pro) | int | 0 | Reference value for how many devices may register for one license. The actual production limit comes from the server license record or customer portal policy. |
| — SpeedHack — | |||
| speedHack.useSpeedHack | bool | true | Master switch for the speed-hack detector. |
| speedHack.checkInterval | float | 1.0 | Polling interval in seconds. Values that are too small or too large are automatically clamped within a safe range. |
| speedHack.requiredDetections | int | 3 | Consecutive suspicious samples required before treating as a violation. Values that are too small or too large are automatically clamped within a safe range. |
| speedHack.detectSlowHack | bool | false | Also detect slow-motion time manipulation. Disabled by default to reduce false positives in games with intentional slow-motion effects. |
| speedHack.useWebTimeValidation | bool | true | Enable HTTPS HEAD-based game time cross-validation with external endpoints. |
| speedHack.webTimeUrls[] | string[] | [] | List of HTTPS addresses used for web-time cross-validation. Set two or more addresses that you manage or trust. If the list is empty, web-time validation has no address to use. |
| speedHack.minSuccessfulEndpoints | int | 2 | Minimum number of webTimeUrls addresses that must return a valid Date header before one web-time round is trusted. |
| speedHack.maxConsecutiveFailures | int | 6 | Number of consecutive failed web-time rounds allowed before the onWebTimeUnavailable policy runs. |
| speedHack.onWebTimeUnavailable | WebTimeUnavailablePolicy | WarnOnly | Policy used when web/server time cannot be checked for several rounds. WarnOnly logs and continues. Strict raises a SpeedHack event after repeated failure. Silent leaves no log, so keep it for special tests. |
| speedHack.enableRemoteSpeedHackConfig | bool | false | Pro server feature. When enabled, /v1/speedhack-config can override selected Speed & Time Hack thresholds without a client rebuild. Requires an active Pro license and server URL. |
| speedHack.remoteSpeedHackConfigInterval | float | 300 | Polling interval in seconds for /v1/speedhack-config. Set 0 to fetch once at boot only. |
| speedHack.remoteSpeedHackConfigJitterPercent | float | 20 | Percentage used to spread Pro remote-config refresh timing around the configured interval. Clamped from 0 to 75. |
| speedHack.enableSignedServerTime | bool | false | Pro server feature. Uses signed /v1/time as the preferred trusted time source when activation is available. Falls back to configured web-time endpoints after repeated failures. |
| — PhysicsHack — | |||
| physicsHack.useGlobalPhysicsHack | bool | true | Global on/off switch for all OZeroPhysicsHackDetector components. Per-object movement thresholds remain on each component in the Inspector. |
| physicsHack.enableServerTelemetry (Pro) | bool | false | Pro only and disabled by default. This explicit project opt-in controls both general security-event telemetry and the detailed PhysicsHack stream when the active license grants the capabilities. Turning it off stops new telemetry events; server policy cannot enable transmission without local consent. |
| physicsHack.telemetryThrottlePerMinute (Pro) | int | 30 | Maximum number of PhysicsHack telemetry events this client can send per minute. 0 means unlimited, so it is not recommended because a badly tuned detector can over-call the server. |
| — Injection — | |||
| injection.useInjection | bool | true | Master switch for Injection & Hooking. Player builds follow the configured response policy, development builds use warning-focused diagnostics, and the Editor generally skips this detector. |
| injection.injectionWhitelistEntries | OZeroInjectionWhitelistEntry[] | empty | Local trusted module entries for the Injection Detector. This is available in every tier, not only Pro. Add only modules shipped with the game or verified through QA, diagnostic files, Pro telemetry, or OZero support guidance. |
WebTimeUnavailablePolicy
Policy used after configured web-time addresses fail for maxConsecutiveFailures rounds in a row. Use this to decide whether a temporary network problem should only be logged or should become a security callback.
| Value | Description |
|---|---|
| WarnOnly | Default. Leave a warning log and keep the game running. This is the safest choice for games that must also work offline. |
| Strict | After repeated failure, raise a SpeedHack callback. Use only after testing real network conditions, because poor connectivity can also cause web-time failure. |
| Silent | Do not log and do not raise a callback. Keep this for short compatibility tests; it is not recommended for release builds. |
OZeroLicenseConfig OZeroSDK.Security.License
A ScriptableObject loaded from Resources/OZeroLicenseConfig. It manages Standard/Pro settings, the project license key, and Pro server settings. A missing asset or empty key behaves as Standard/serverless mode.
Fields
| Field | Type | Description |
|---|---|---|
| tier | OZeroLicenseTier | Standard uses the shared native module. Pro provides a project-specific native binary, server activation, telemetry, and remote security settings. |
| licenseKey | string | The project Pro license key in OZ-PRO-... format. It validates the project binding of the dedicated binary and is used for server activation and Pro server features. |
| allowStandardBuildWithPremiumLicense | bool | Explicit native variant compatibility override. Pro tiers may use it to build with the Standard public native module. Standard tier may use it to build with a Pro private native variant package, but the matching license key must be entered and build/runtime validation still checks the signed manifest, license key hash, project identity, and native hashes. Standard public variant builds remain keyless even when this option is enabled. |
| serverBaseUrl | string | The server address for Pro activation, telemetry, signed time, attestation, and server policies. Serverless mode does not call it. Keep https://api.ozerosecurity.com unless support provides a dedicated endpoint. |
| serverPublicKeyHex | string | The Pro server signing public key from Customer Portal > Server Key. It verifies server response signatures. Dedicated binary manifests are verified separately with the SDK-embedded binary signing key, not this field. |
| previousServerPublicKeyHex | string | Previous Pro server signing public key used only during a server key rotation grace window. Leave it empty normally. |
| tokenTtlSeconds | int | Pro runtime offline cache duration. After expiry, Pro server features stay disabled until activation succeeds again. |
| offlineProPolicyMode | OZeroOfflineProPolicyMode | Controls how local Build Integrity applies signed Pro portal block policies while the device is offline. |
| activationTimeoutSeconds | float | Pro runtime activation timeout. If activation does not finish in time, the game continues with valid cached Pro info or Standard/serverless behavior. |
| enableLog | bool | Outputs license-flow diagnostic logs via OZeroSecLog. Useful while setting up Pro. |
| enableDevicePolicyHeartbeat | bool | Pro only. Periodically checks whether the current device is still in an allowed state. |
| devicePolicyHeartbeatInterval | float | Base interval in seconds for Pro device policy checks. Default 300; 0 disables periodic checks. |
| devicePolicyHeartbeatJitterPercent | float | Percentage used to spread Pro device-policy heartbeat timing around the configured interval so many devices do not call at once. Clamped from 0 to 75. |
| enableSecurityLevelCheck | bool | Pro only. Lets the server verify that the build declares the expected security level. |
| declaredSecurityLevel | OZeroDeclaredSecurityLevel | Security level this build declares to the server. |
| failOnSecurityLevelReject | bool | If true, an explicit server rejection of the declared security level or config hash triggers the configured hard response. |
| securityLevelCheckInterval | float | Periodic server re-check interval in seconds. 0 means boot-time check only. |
| securityLevelCheckJitterPercent | float | Percentage used to spread periodic security-level checks around the configured interval so many devices do not call at once. Clamped from 0 to 75. |
OZeroDeclaredSecurityLevel
Enum sent to the Pro server when security-level validation is enabled. The server compares this value with the minimum level configured for the license.
| Value | Description |
|---|---|
| Low | Prototype or development build level. Use only when the server policy intentionally allows a low protection declaration. |
| Standard | Default and recommended live-game declaration for normal protected builds. |
| Strict | Maximum protection declaration. Use only after QA confirms the project can run with the strict policy set. |
OZeroOfflineProPolicyMode
Controls how local Build Integrity handles signed Pro portal block policies when the device cannot reach the server. The values intentionally separate fail-open operation, fail-closed policy enforcement, and test bypass behavior.
| Value | Description |
|---|---|
| ApplyCachedBlockPolicies | Recommended fail-open default. Applies a valid cached signed policy while offline; if no usable cache exists, this policy gate passes. |
| RequireFreshPolicy | Strict fail-closed mode. If no usable signed policy is available, Build Integrity fails when server Integrity is enabled. |
| IgnoreCachedBlockPolicies | Bypass mode. Does not read cached Pro block policy while offline; use only for tests or migrations, not live builds. |
Properties
Loads the runtime config from Resources. If null, treat it the same as Standard.
Indicates a configuration that runs without server activation. True for Standard or an empty license key; false when Pro server activation is required. Existing compatibility configurations remain supported by the SDK.
Indicates a configuration eligible for dedicated native binary validation, including Pro. The imported signed manifest identifies whether a private package is present. Existing compatibility configurations remain supported by the SDK.
True only when the explicit native variant compatibility override is enabled for the current project.
OZeroLicenseRuntime OZeroSDK.Security.License
Runtime API for reading the current license state. It is initialized automatically at app startup, so most projects only need to read the state or call HasCapability.
Properties
| Name | Type | Description |
|---|---|---|
| Entitlement | OZeroLicenseEntitlement | Currently activated Pro authorization info. Null in Standard mode. |
| HasEntitlement | bool | True when there is current Pro activation info. |
| IsServerless | bool | True when the SDK is running without Pro server features. |
| Initialized | bool | True after the license runtime has finished its first startup processing. |
| IsProDowngraded | bool | True when the SDK silently continues as Standard after Pro activation failure or expiry. |
| DowngradeReason | string | Diagnostic reason for the most recent automatic downgrade (fallback to default protection). |
| DeviceIdProvider | Func<string> | Optionally overrides the device id used for activation. If your project needs to use a custom identifier, set this before initialization. |
Methods
Safe to call multiple times. Usually called automatically by the SDK; custom bootstraps can await it before reading license state.
Returns whether the current activation info includes capability permissions like telemetry, signed_time, or attestation. False in Standard.
License Server Runtime Calls
Pro features use HTTPS JSON APIs under /v1. OZA v2 is a one-time token bound to an audience, a 256-bit challenge, a session ID, and build evidence. Calls to /v1/validate require a License Server API Key and the same binding values; every successful token is consumed atomically. Teams without a backend use OZero Managed with a root-signed keyset and OZMS receipt.
| Endpoint | Purpose |
|---|---|
| POST /v1/activate | Activates a Pro license for the current device and refreshes the local activation info. |
| GET /v1/time | Provides signed server time for Speed & Time Hack validation when enabled. |
| POST /v1/attest | Issues a Pro build attestation token with a unique token ID after enabled integrity checks pass. The nonce is bound to the submitted build evidence and app identity. |
| POST /v1/validate | Validates OZA v2 from the game server. A Server API Key and audience/challenge/sessionId are required, and every successful token is consumed exactly once. |
| POST /v1/managed-session | For teams without their own backend, OZero validates the Pro OZA token and returns an allow/warn/block verdict with a short session. The SDK attempts auto-revalidation before the session expires, and flows reusing the same token are blocked. |
| POST /v1/telemetry | Sends security events to the server when Pro telemetry capability is active. |
POST /v1/activate contract
This is the basic request contract sent by the Unity SDK when it activates a Pro license. The server schema can accept additional native verification fields, but the current SDK activation request sends the fields below.
| Field | Type | Required | Description |
|---|---|---|---|
| licenseKey | string | yes | Pro license key used by /v1/activate. The server validates key format, status, tier, expiry, and device capacity. |
| deviceId | string | yes | Device identifier from OZeroLicenseRuntime.DeviceIdProvider. Used for activation count, cache binding, and device policy. |
| sdkVersion | string | yes | SDK version string. The server validates a semver-like format and writes it to activation records. |
| platform | enum string | yes | One of windows, windows_server, macos, linux, linux_server, ios, android, webgl, or unknown. |
| appIdentifier | string | optional | Unity Application.identifier when available. Compared with the license identity policy. |
| companyName | string | optional | Unity Application.companyName when available. |
| productName | string | optional | Unity Application.productName when available. |
| webglOrigin | string | optional | HTTP(S) origin for WebGL builds when Unity provides Application.absoluteURL. |
| Field | Type | Description |
|---|---|---|
| activated | bool | True when activation was accepted. |
| tier | string | Resolved license tier returned by the server. |
| capabilities | string[] | Capability list used by OZeroLicenseRuntime.HasCapability. |
| serverFeaturesEnabled | bool | True for Pro server-backed features. |
| signedToken | string | Signed activation token. The SDK verifies this token before trusting the entitlement. |
| keyId | string | Signing key id used for server key rotation diagnostics. |
| expiresAt | number | Unix milliseconds when the activation token expires. |
code and message. Common codes include BAD_JSON, BAD_REQUEST, LICENSE_NOT_FOUND, LICENSE_PENDING, LICENSE_SUSPENDED, LICENSE_REVOKED, LICENSE_EXPIRED, DEVICE_BLOCKED, ACTIVATION_LIMIT, SERVER_NOT_CONFIGURED, and SIGN_FAILED. The SDK treats explicit license or identity denials differently from temporary network failures.
OZeroAbortCode & Event Messages
When OZero confirms a security threat, it creates an OZeroSecurityEvent and passes it to the built-in response flow and any project callbacks. The event contains ModulationType, a stable public OZeroAbortCode, MessageKey, a safe English Message, and WillAbort.
Abort code and message table
| Code | OZeroAbortCode | ModulationType | MessageKey | Message |
|---|---|---|---|---|
| 0x01 | MemoryModulation | MemoryModulation | memory_modulation | Protected memory value changed unexpectedly. |
| 0x02 | Injection | Injection | injection | Unexpected module, hook, or runtime injection signal detected. |
| 0x0A | BuildIntegrity | BuildIntegrity | build_integrity | Build integrity validation failed. |
| 0x0C | SpeedOrTimeHack | SpeedHack | speed_hack | Suspicious time scale or execution speed change detected. |
| 0x0C | SpeedOrTimeHack | TimeHack | time_hack | System clock or trusted time anomaly detected. |
| 0x0E | DeviceOrInstallPolicy | DeviceBindingModulation | device_binding | Device binding policy rejected the current device. |
| 0x0E | DeviceOrInstallPolicy | InstallSource | install_source | Application install source is not trusted. |
| 0x0F | PhysicsHack | PhysicsHack | physics_hack | Abnormal physics behavior exceeded the configured policy. |
| 0x10 | EnvironmentModulation | EnvironmentModulation | environment_modulation | Unsupported or unsafe runtime environment detected. |
| 0x13 | SteamAntiPiracy | SteamAntiPiracy | steam_antipiracy | Steam ownership or ticket validation failed. |
| 0x15 | InjectionScannerUnavailable | InjectionScannerUnavailable | injection_scanner_unavailable | The injection scanner could not run; the SDK closes the game rather than continue unprotected. Fires even when ForceQuitOnDetection is off. |
Use OZeroAbortCode and MessageKey as the base values for logs and localized UI. Message is written in safe, developer-friendly language so it can be shown directly on developer screens or QA logs.
Handling security events at runtime
By default, OZero either closes the app or leaves a log according to the Response settings in the Config Dashboard. Register a handler with OZeroSecurityManager.RegisterUserCallback when you need to show your own warning screen, send a server log, or save a small amount of data just before the app closes.
If evt.WillAbort is true, the current response policy will close the app after the callback flow. Use that time only for short work such as analytics flush or a final save. The callback is a reporting and cleanup hook; it is not a way to cancel OZero's security response.
using OZeroSDK.Security;
void OnEnable()
{
OZeroSecurityManager.Instance.RegisterUserCallback(OnHack);
}
void OnHack(OZeroSecurityEvent evt)
{
Debug.LogWarning(
$"OZero: {evt.Type} {evt.AbortCodeHex} {evt.MessageKey} - {evt.Message}");
if (evt.WillAbort)
{
// Last chance to flush your own analytics or save state.
}
Analytics.FlushSync();
}
Injection Detector API OZeroSDK.Security
API for registering modules that should be treated as trusted by the Injection scan. Use it for overlays, recorders, operations plugins, or partner modules that ship with your game and are known to be safe but may be detected. HashHex is the SHA-256 hash of the module file, and SignerHex is the SHA-256 hash of the module signing certificate. Do not guess these values; register only values confirmed from the actual distributed file or diagnostic output.
Data Structure — OZeroInjectionWhitelistEntry
[Serializable]
public class OZeroInjectionWhitelistEntry
{
// SHA-256 of the matched module file. Lowercase 64-char hex. Required.
public string HashHex { get; set; }
// SHA-256 of the module's signing certificate. Lowercase 64-char hex.
// Empty ("") means "match by hash only" (only mode for Android .so / Linux ELF).
public string SignerHex { get; set; }
// Module file format hint — "pe" | "macho" | "so". Defaults to "so".
public string Type { get; set; }
// Optional human-readable note (UI / audit only — never sent to native).
public string Comment { get; set; }
}
Data structure for local trusted module entries in Unity. HashHex is the required 64-character SHA-256 file hash, and SignerHex is an optional 64-character signer fingerprint. Type is one of pe, macho, or so, and Comment is a human-readable note.
Runtime API — OZeroDispatch
// Returns true when trusted-module policy support is available.
public static bool HasInjectionV3 { get; }
// Replace trusted module entries atomically. Pass null/empty to clear.
// Returns false when the runtime support is unavailable.
public static bool RegisterInjectionWhitelistHash(OZeroInjectionWhitelistEntry[] entries);
// Trusted-module aware scan. Returns true when a relevant runtime signal is observed.
// Output fields are diagnostic context for your review and may be empty.
public static bool DetectAssemblyInjectionV3(
out bool silencedByWhitelist,
out string hashHex,
out string signerHex,
out string matchedModulePath);
Used at runtime to pass the trusted module list to the native scanner, or to check whether this feature is available on the current platform. Most projects only need the Injection settings in the Config Dashboard. If you call this API directly, register only the required entries after distribution files are finalized and verify the result in QA logs.
Config — OZeroSecurityConfig.InjectionSettings
// Preferred local trusted-module surface in the Injection settings.
public OZeroInjectionWhitelistEntry[] InjectionWhitelistEntries { get; }
InjectionWhitelistEntries is the local trusted module list inside the Injection settings. It is not meant to broadly allow programs randomly installed on a customer's PC. Use it only for modules distributed with the game whose normal behavior has been confirmed by the developer. This local list is available in all tiers; Pro customers can update the same kind of policy during live operations through the customer portal server-managed whitelist.