![]() |
Anti-Cheat Toolkit
2024.3.5
Multi-purpose anti-cheat solution for Unity Engine
|
Inherits ACTkDetectorBase< SpeedHackDetector >.
Public Member Functions | |
void | TriggerDetection () |
Static Public Member Functions | |
static SpeedHackDetector | AddToSceneOrGetExisting () |
static SpeedHackDetector | StartDetection () |
static SpeedHackDetector | StartDetection (Action callback) |
static SpeedHackDetector | StartDetection (Action callback, float interval) |
static SpeedHackDetector | StartDetection (Action callback, float interval, byte maxFalsePositives) |
static SpeedHackDetector | StartDetection (Action callback, float interval, byte maxFalsePositives, int coolDown) |
static void | StopDetection () |
static void | Dispose () |
Public Attributes | |
float | interval = 1f |
float | threshold = 0.2f |
byte | maxFalsePositives = 3 |
int | coolDown = 30 |
bool | autoStart |
bool | autoDispose |
Properties | |
bool | UseDsp [get, set] |
bool | IsCheatDetected [get, protected set] |
bool | IsStarted [get, protected set] |
bool | IsRunning [get, protected set] |
Events | |
Action | CheatDetected |
Allows to detect Cheat Engine's speed hack (and maybe some other speed hack tools) usage.
Just add it to any GameObject as usual or through the "GameObject > Create Other > Code Stage > Anti-Cheat Toolkit" menu to get started.
You can use detector completely from inspector without writing any code except the actual reaction on cheating.
Avoid using detectors from code at the Awake phase.
|
inlinestatic |
Creates new instance of the detector at scene if it doesn't exists. Make sure to call NOT from Awake phase.
|
inlinestatic |
Starts speed hack detection for detector you have in scene.
Make sure you have properly configured detector in scene with autoStart disabled before using this method.
|
inlinestatic |
Starts speed hack detection with specified callback.
If you have detector in scene make sure it has empty Detection Event.
Creates a new detector instance if it doesn't exists in scene.
callback | Method to call after detection. |
|
inlinestatic |
Starts speed hack detection with specified callback using passed interval.
If you have detector in scene make sure it has empty Detection Event.
Creates a new detector instance if it doesn't exists in scene.
|
inlinestatic |
Starts speed hack detection with specified callback using passed interval and maxFalsePositives.
If you have detector in scene make sure it has empty Detection Event.
Creates a new detector instance if it doesn't exists in scene.
callback | Method to call after detection. |
interval | Time in seconds between speed hack checks. Overrides interval property. |
maxFalsePositives | Amount of possible false positives. Overrides maxFalsePositives property. |
|
inlinestatic |
Starts speed hack detection with specified callback using passed interval, maxFalsePositives and coolDown.
If you have detector in scene make sure it has empty Detection Event.
Creates a new detector instance if it doesn't exists in scene.
callback | Method to call after detection. |
interval | Time in seconds between speed hack checks. Overrides interval property. |
maxFalsePositives | Amount of possible false positives. Overrides maxFalsePositives property. |
coolDown | Amount of sequential successful checks before resetting false positives counter. Overrides coolDown property. |
|
inlinestatic |
Stops detector. Detector's component remains in the scene. Use Dispose() to completely remove detector.
|
inlinestatic |
Stops and completely disposes detector component.
On dispose Detector follows 2 rules:
|
inline |
Manually triggers cheating detection and invokes assigned events.
float interval = 1f |
Time (in seconds) between detector checks.
float threshold = 0.2f |
Allowed speed multiplier threshold. Do not set to too low values (e.g. 0 or 0.00*) since there are timer fluctuations on different hardware.
byte maxFalsePositives = 3 |
Maximum false positives count allowed before registering speed hack.
int coolDown = 30 |
Amount of sequential successful checks before clearing internal false positives counter.
Set 0 to disable Cool Down feature.
|
inherited |
Allows to start detector automatically. Otherwise, you'll need to call StartDetection() method to start it.
Useful in conjunction with proper Detection Event configuration in the inspector. Allows to use detector without writing any code except the actual reaction on cheating.
|
inherited |
Detector component will be automatically disposed after firing callback if enabled. Otherwise, it will just stop internal processes.
On dispose Detector follows 2 rules:
|
getset |
Controls whether to use DSP Timer to catch speed hacks in sandboxed environments (like WebGL, VMs, etc.).
Uses AudioSettings.dspTime under the hood, which can catch some extra speed hacks in sandboxed environments but can potentially cause false positives on some hardware due to way too high sensitivity. WARNING: Use at your peril!
|
getprotected setinherited |
Indicates if cheat was detected by this detector.
|
getprotected setinherited |
Allows to check if detector is started (stays true even when it's paused).
|
getprotected setinherited |
Allows to check if detection is currently running and not paused.
|
inherited |
Subscribe to this event to get notified when cheat will be detected.