![]() |
Anti-Cheat Toolkit
2024.3.5
Multi-purpose anti-cheat solution for Unity Engine
|
Inherits ACTkDetectorBase< WallHackDetector >.
Public Member Functions | |
void | TriggerDetection () |
Static Public Member Functions | |
static WallHackDetector | AddToSceneOrGetExisting () |
static WallHackDetector | StartDetection () |
static WallHackDetector | StartDetection (Action callback) |
static WallHackDetector | StartDetection (Action callback, Vector3 spawnPosition) |
static WallHackDetector | StartDetection (Action callback, Vector3 spawnPosition, byte maxFalsePositives) |
static void | StopDetection () |
static void | Dispose () |
Public Attributes | |
int | wireframeDelay = 10 |
int | raycastDelay = 10 |
Vector3 | spawnPosition |
byte | maxFalsePositives = 3 |
bool | autoStart |
bool | autoDispose |
Properties | |
bool | CheckRigidbody [get, set] |
bool | CheckController [get, set] |
bool | CheckWireframe [get, set] |
bool | CheckRaycast [get, set] |
bool | IsCheatDetected [get, protected set] |
bool | IsStarted [get, protected set] |
bool | IsRunning [get, protected set] |
Events | |
Action | CheatDetected |
Detects common types of wall hack cheating: walking through the walls (Rigidbody and CharacterController modules), shooting through the walls (Raycast module), looking through the walls (Wireframe module).
In order to work properly, this detector creates and uses some service objects right in the scene.
It places all such objects within 3x3x3 sandbox area which is placed at the spawnPosition and drawn as a red wire cube in the scene when you select Game Object with this detector.
Please, place this sandbox area at the empty unreachable space of your game to avoid any collisions and false positives.
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.
Note #1: Adds new objects to the scene and places them into the "[WH Detector Service]" container at the spawnPosition.
Note #2: May use physics and shaders. It may lead to the build size increase and additional resources usage.
|
inlinestatic |
Creates new instance of the detector at scene if it doesn't exists. Make sure to call NOT from Awake phase.
|
inlinestatic |
Starts 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 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 detection with specified callback using passed spawnPosition.
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. |
spawnPosition | World position of the service 3x3x3 container. Overrides spawnPosition property. |
|
inlinestatic |
Starts detection with specified callback using passed spawnPosition 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. |
spawnPosition | World position of the service 3x3x3 container. Overrides spawnPosition property. |
maxFalsePositives | Amount of possible false positives in a row before registering detection. Overrides maxFalsePositives property. |
|
inlinestatic |
Stops detector. Detector's component remains in the scene. Use Dispose() to completely remove detector.
|
inlinestatic |
Stops and completely disposes detector component and destroys Service Container as well.
On dispose Detector follows 2 rules:
|
inline |
Manually triggers cheating detection and invokes assigned events.
int wireframeDelay = 10 |
Delay between Wireframe module checks, from 1 up to 60 secs.
int raycastDelay = 10 |
Delay between Raycast module checks, from 1 up to 60 secs.
Vector3 spawnPosition |
World coordinates of the service container. Please keep in mind it will have different active objects within 3x3x3 cube during gameplay. It should be unreachable for your game objects to avoid collisions and false positives.
byte maxFalsePositives = 3 |
Maximum false positives in a row for each detection module before registering a wall hack.
|
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 |
Check for the "walk through the walls" kind of cheats made via Rigidbody hacks?
Disable to save some resources if you're not using Rigidbody for characters.
|
getset |
Check for the "walk through the walls" kind of cheats made via Character Controller hacks?
Disable to save some resources if you're not using Character Controllers.
|
getset |
Check for the "see through the walls" kind of cheats made via shader or driver hacks (wireframe, color alpha, etc.)?
Disable to save some resources in case you don't care about such cheats.
NOTE: Uses specific shader under the hood. Thus such shader should be included into the build to exist at runtime.
You may easily add or remove shader at the ACTk Settings window (Window > Code Stage > Anti-Cheat Toolkit > Settings).
You'll see error in logs at runtime if you'll have no needed shader included.
|
getset |
Check for the "shoot through the walls" kind of cheats made via Raycast hacks?
Disable to save some resources in case you don't care about such cheats.
|
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.