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 previousCodeStage/AntiCheatToolkitfolder 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 > Validateor use the migration commands underTools > 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 ofAwake()orOnEnable(). If you're starting your existing in-scene detectors through code, make sure you're usingStartDetection()methods at the MonoBehaviour'sStart()phase, not at theAwake()orOnEnable()phases. All detectors except InjectionDetector will print details about detection if you enableACTK_DETECTION_BACKLOGSflag in ACTk Settings. Inspect logs generated withACTK_DETECTION_BACKLOGSto 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). EnableACTK_INJECTION_DEBUGto 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 Raycastlayer collides with itself in the Layer Collision Matrix atEdit > 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 alink.xmlor 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 > Validatemenu 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
HEADtoGETto 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 viaTools > 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
StreamingAssetsinto a writable location (such asApplication.persistentDataPath) before callingObscuredFileorObscuredFilePrefs. 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 existerror, ensure required physics and rendering components exist in scenes or keep them vialink.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_PERMISSIONwhen you do not ship the Time Cheating Detector to avoid addingandroid.permission.INTERNET. - Unwanted Android READ_PHONE_STATE permission: define
ACTK_PREVENT_READ_PHONE_STATEwhen 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_COMPATIBLEto downgrade algorithms (with reduced security, see Compatibility).
When in doubt, reach out via Discord or contact us with reproduction steps and logs.