Anti-Cheat Toolkit  2023.2.6
Multi-purpose anti-cheat solution for Unity Engine
ACTkDetectorBase< T > Class Template Referenceabstract

Inherits KeepAliveBehaviour< T >.

Public Attributes

bool autoStart = true
 
bool autoDispose = true
 
bool keepAlive = true
 

Properties

bool IsCheatDetected [get, protected set]
 
bool IsStarted [get, protected set]
 
bool IsRunning [get, protected set]
 
static T Instance [get, protected set]
 

Events

Action CheatDetected
 

Detailed Description

Base class for all detectors.

Type Constraints
T :ACTkDetectorBase<T> 

Member Data Documentation

◆ autoStart

bool autoStart = true

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.

◆ autoDispose

bool autoDispose = true

Detector component will be automatically disposed after firing callback if enabled. Otherwise, it will just stop internal processes.

On dispose Detector follows 2 rules:

  • if Game Object's name is "Anti-Cheat Toolkit": it will be automatically destroyed if no other Detectors left attached regardless of any other components or children;
  • if Game Object's name is NOT "Anti-Cheat Toolkit": it will be automatically destroyed only if it has neither other components nor children attached;

◆ keepAlive

bool keepAlive = true
inherited

Will survive new level (scene) load if checked. Otherwise it will be destroyed.

On dispose Behaviour follows 2 rules:

  • if Game Object's name is "Anti-Cheat Toolkit": it will be automatically destroyed if no other Behaviours left attached regardless of any other components or children;
  • if Game Object's name is NOT "Anti-Cheat Toolkit": it will be automatically destroyed only if it has neither other components nor children attached;

Property Documentation

◆ IsCheatDetected

bool IsCheatDetected
getprotected set

Indicates if cheat was detected by this detector.

◆ IsStarted

bool IsStarted
getprotected set

Allows to check if detector is started (stays true even when it's paused).

◆ IsRunning

bool IsRunning
getprotected set

Allows to check if detection is currently running and not paused.

◆ Instance

T Instance
staticgetprotected setinherited

Allows reaching public properties from code. Can be null if behaviour does not exist in scene or if accessed at or before Awake phase.

Event Documentation

◆ CheatDetected

Action CheatDetected

Subscribe to this event to get notified when cheat will be detected.