My Project
Loading...
Searching...
No Matches
Static Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
CodeStage.AntiCheat.Detectors.ObscuredCheatingDetector Class Reference

Detects cheating of any Obscured type (except ObscuredPrefs, it has own detection features) used in project. More...

Inheritance diagram for CodeStage.AntiCheat.Detectors.ObscuredCheatingDetector:
CodeStage.AntiCheat.Detectors.ACTkDetectorBase

Static Public Member Functions

static ObscuredCheatingDetector AddToSceneOrGetExisting ()
 Creates new instance of the detector at scene if it doesn't exists. Make sure to call NOT from Awake phase.
 
static void StartDetection ()
 Starts all Obscured types cheating detection for detector you have in scene.
 
static void StartDetection (Action callback)
 Starts all Obscured types cheating detection with specified callback.
 
static void StopDetection ()
 Stops detector. Detector's component remains in the scene. Use Dispose() to completely remove detector.
 
static void Dispose ()
 Stops and completely disposes detector component.
 

Public Attributes

double doubleEpsilon = 0.0001d
 Max allowed difference between encrypted and fake values in ObscuredDouble. Increase in case of false positives.
 
float floatEpsilon = 0.0001f
 Max allowed difference between encrypted and fake values in ObscuredFloat. Increase in case of false positives.
 
float vector2Epsilon = 0.1f
 Max allowed difference between encrypted and fake values in ObscuredVector2. Increase in case of false positives.
 
float vector3Epsilon = 0.1f
 Max allowed difference between encrypted and fake values in ObscuredVector3. Increase in case of false positives.
 
float quaternionEpsilon = 0.1f
 Max allowed difference between encrypted and fake values in ObscuredQuaternion. Increase in case of false positives.
 
- Public Attributes inherited from CodeStage.AntiCheat.Detectors.ACTkDetectorBase
bool autoStart = true
 Allows to start detector automatically. Otherwise, you'll need to call StartDetection() method to start it.
 
bool keepAlive = true
 Detector will survive new level (scene) load if checked. Otherwise it will be destroyed.
 
bool autoDispose = true
 Detector component will be automatically disposed after firing callback if enabled. Otherwise, it will just stop internal processes.
 

Protected Member Functions

override void OnDestroy ()
 
override void StartDetectionAutomatically ()
 
override void DisposeInternal ()
 
- Protected Member Functions inherited from CodeStage.AntiCheat.Detectors.ACTkDetectorBase
virtual void OnDestroy ()
 
virtual bool Init (ACTkDetectorBase instance, string detectorName)
 
virtual void DisposeInternal ()
 
virtual bool DetectorHasCallbacks ()
 
virtual void StopDetectionInternal ()
 
virtual void PauseDetector ()
 
virtual bool ResumeDetector ()
 
abstract void StartDetectionAutomatically ()
 

Properties

static ObscuredCheatingDetector Instance [get]
 Allows reaching public properties from code. Can be null if detector does not exist in scene or if accessed at Awake phase.
 
- Properties inherited from CodeStage.AntiCheat.Detectors.ACTkDetectorBase
bool IsRunning [get]
 Allows to check if detection is currently running.
 

Additional Inherited Members

- Protected Attributes inherited from CodeStage.AntiCheat.Detectors.ACTkDetectorBase
UnityEvent detectionEvent
 
bool detectionEventHasListener
 
bool started
 
bool isRunning
 
- Static Protected Attributes inherited from CodeStage.AntiCheat.Detectors.ACTkDetectorBase
const string ContainerName = "Anti-Cheat Toolkit Detectors"
 
const string MenuPath = "Code Stage/Anti-Cheat Toolkit/"
 
const string GameObjectMenuPath = "GameObject/Create Other/" + MenuPath
 
static GameObject detectorsContainer
 
- Events inherited from CodeStage.AntiCheat.Detectors.ACTkDetectorBase
Action CheatDetected
 Subscribe to this event to get notified when cheat will be detected.
 

Detailed Description

Detects cheating of any Obscured type (except ObscuredPrefs, it has own detection features) used in project.

It allows cheaters to find desired (fake) values in memory and change them, keeping original values secure.
It's like a cheese in the mouse trap - cheater tries to change some obscured value and get caught on it.

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.

Member Function Documentation

◆ AddToSceneOrGetExisting()

static ObscuredCheatingDetector CodeStage.AntiCheat.Detectors.ObscuredCheatingDetector.AddToSceneOrGetExisting ( )
inlinestatic

Creates new instance of the detector at scene if it doesn't exists. Make sure to call NOT from Awake phase.

Returns
New or existing instance of the detector.

◆ Dispose()

static void CodeStage.AntiCheat.Detectors.ObscuredCheatingDetector.Dispose ( )
inlinestatic

Stops and completely disposes detector component.

On dispose Detector follows 2 rules:

  • if Game Object's name is "Anti-Cheat Toolkit Detectors": 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 Detectors": it will be automatically destroyed only if it has neither other components nor children attached;

◆ DisposeInternal()

override void CodeStage.AntiCheat.Detectors.ObscuredCheatingDetector.DisposeInternal ( )
inlineprotectedvirtual

◆ OnDestroy()

override void CodeStage.AntiCheat.Detectors.ObscuredCheatingDetector.OnDestroy ( )
inlineprotectedvirtual

◆ StartDetection() [1/2]

static void CodeStage.AntiCheat.Detectors.ObscuredCheatingDetector.StartDetection ( )
inlinestatic

Starts all Obscured types cheating detection for detector you have in scene.

Make sure you have properly configured detector in scene with #autoStart disabled before using this method.

◆ StartDetection() [2/2]

static void CodeStage.AntiCheat.Detectors.ObscuredCheatingDetector.StartDetection ( Action  callback)
inlinestatic

Starts all Obscured types cheating 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.

Parameters
callbackMethod to call after detection.

◆ StartDetectionAutomatically()

override void CodeStage.AntiCheat.Detectors.ObscuredCheatingDetector.StartDetectionAutomatically ( )
inlineprotectedvirtual

The documentation for this class was generated from the following file: