Table of Contents

Troubleshooting guide

Use this section to resolve common issues quickly. When reporting bugs, include logs from a development build with ACTK_DETECTION_BACKLOGS enabled so the maintainer can inspect detector history.

Updates and migrations

  • Compilation errors after updating (e.g. error CS1061: 'SerializedProperty' does not contain a definition for 'GetValue'): always remove the previous CodeStage/AntiCheatToolkit folder before importing a new package version. Leftover files from the old version can conflict with the updated code and cause compilation errors. This is the most common cause of build errors right after an ACTk update.
  • Serialized obscured values behave incorrectly: run the validators under Tools > Code Stage > Anti-Cheat Toolkit > Validate or use the migration commands under Tools > Code Stage > Anti-Cheat Toolkit > Migrate. Some releases ship model upgrades that need a one-time migration.

Detector-specific issues

  • False positives: start detectors in Start() instead of Awake() or OnEnable(). If you're starting your existing in-scene detectors through code, make sure you're using StartDetection() methods at the MonoBehaviour's Start() phase, not at the Awake() or OnEnable() phases. All detectors except InjectionDetector will print details about detection if you enable ACTK_DETECTION_BACKLOGS flag in ACTk Settings. Inspect logs generated with ACTK_DETECTION_BACKLOGS to identify the module that triggered the detection. Please report any false positives with logs generated on development build with this flag enabled if possible.
  • Injection Detector false positives: make sure you've added all external libraries your game uses to the whitelist (menu: Tools > Code Stage > Anti-Cheat Toolkit > Injection Detector Whitelist Editor). Enable ACTK_INJECTION_DEBUG to log offending assembly names.
  • WallHack Detector false positives: make sure you've properly configured Spawn Position of the detector and the detector's service objects are not intersecting with any objects from your game. Also, make sure the Ignore Raycast layer collides with itself in the Layer Collision Matrix at Edit > Project Settings > Physics. WallHackDetector places all its service objects to the Ignore Raycast layer to help you avoid unnecessary collisions with your game objects and collides such objects with each other. That's why you need to make sure the Ignore Raycast layer will collide with itself. Add required components to a link.xml or let the settings window generate it for IL2CPP builds.
  • Obscured Cheating Detector false positives: please ensure you have no corrupted instances of the serialized obscured types. To do so, navigate to Tools > Code Stage > Anti-Cheat Toolkit > Validate menu to detect corrupted data. Alternatively, reset broken variables in inspector and re-set them manually if you don't wish to migrate.
  • Time Cheating Detector errors on old Android devices: if you see "Error response code: 0" or "java.io.EOFException" errors in logs from Time Cheating Detector on old Android devices (before Android 6), switch the request method from HEAD to GET to avoid UnityWebRequest bugs in pre-Android 6 runtimes.

Platform quirks

  • Android ProGuard / R8 errors: add the following rules to proguard-user.txt (the settings window can generate the file via Tools > Code Stage > Anti-Cheat Toolkit > Configure proguard-user.txt):
  -keep class net.codestage.actk.androidnative.ACTkAndroidRoutines { *; }
  -keep class net.codestage.actk.androidnative.CodeHashGenerator { public void GetCodeHash(...); }
  -keep class net.codestage.actk.androidnative.CodeHashCallback { *; }
  • ClassNotFoundException errors in ADB logs: if you see "java.lang.ClassNotFoundException: net.codestage.*" errors in ADB logs, make sure to exclude native ACTk Android plugin from obfuscation or minification. See ProGuard rules above.
  • Android screen recording prevention not working: the blocker relies on system APIs and may fail on heavily customized ROMs or rooted devices.
  • StreamingAssets access on Android/WebGL: copy data from StreamingAssets into a writable location (such as Application.persistentDataPath) before calling ObscuredFile or ObscuredFilePrefs. This is an expected behavior due to the StreamingAssets nature at these platforms (see Unity Manual for more details).
  • IL2CPP component stripping: when getting Can't add component because class * doesn't exist error, ensure required physics and rendering components exist in scenes or keep them via link.xml (WallHackDetector does use these Unity components: BoxCollider, MeshCollider, CapsuleCollider, Camera, Rigidbody, CharacterController, MeshRenderer). The settings window can auto-generate the file for WallHack Detector.
  • CodeHashGeneratorPostprocessor event not firing in CI: call CodeHashGeneratorPostprocessor.CalculateExternalBuildHashes(buildPath, printToConsole) to run the process synchronously instead of relying on the asynchronous event.

Permissions and compliance

  • Unwanted Android INTERNET permission: define ACTK_PREVENT_INTERNET_PERMISSION when you do not ship the Time Cheating Detector to avoid adding android.permission.INTERNET.
  • Unwanted Android READ_PHONE_STATE permission: define ACTK_PREVENT_READ_PHONE_STATE when you do not use Device Lock based on platform identifiers. If you still enable Device Lock features with this symbol present, ACTk warns via logs and behavior is degraded.
  • Apple export compliance: ACTk uses mass-market encryption by default. If you must avoid encryption declarations entirely, define ACTK_US_EXPORT_COMPATIBLE to downgrade algorithms (with reduced security, see Compatibility).

When in doubt, reach out via Discord or contact us with reproduction steps and logs.