Anti-Cheat Toolkit
2024.0.0
Multi-purpose anti-cheat solution for Unity Engine
|
Inherits KeepAliveBehaviour< CodeHashGenerator >, and ICodeHashGenerator.
Static Public Member Functions | |
static bool | IsTargetPlatformCompatible () |
static ICodeHashGenerator | AddToSceneOrGetExisting () |
static ICodeHashGenerator | Generate (int maxThreads=1) |
static Task< HashGeneratorResult > | GenerateAsync (int maxThreads=1) |
Public Attributes | |
bool | keepAlive |
Properties | |
HashGeneratorResult | LastResult [get] |
bool | IsBusy [get] |
static T | Instance [get, protected set] |
Events | |
static HashGeneratorResultHandler | HashGenerated |
Generates current application runtime code hash to let you validate it against previously generated runtime code hash to detect external code manipulations.
Calculation is done on the separate threads where possible to prevent noticeable CPU spikes and performance impact.
Supported platforms: Windows PC, Android (more to come)
Resulting hash in most cases should match value you get from the CodeHashGeneratorPostprocessor.
|
inlinestatic |
Call to make sure current platform is compatible before calling Generate().
|
inlinestatic |
Creates new instance of the CodeHashGenerator at scene if it doesn't exists. Make sure to call NOT from Awake phase.
|
inlinestatic |
Call to start current runtime code hash generation. Automatically adds instance to the scene if necessary.
maxThreads | Threads to use while hashing the files. |
Implements ICodeHashGenerator.
|
inlinestatic |
Awaitable version of Generate(). Allows awaiting for the generation result.
maxThreads | Threads to use while hashing the files. |
Implements ICodeHashGenerator.
|
inherited |
Will survive new level (scene) load if checked. Otherwise it will be destroyed.
On dispose Behaviour follows 2 rules:
|
get |
Stores previously calculated result. Can be null if Generate() wasn't called yet or if it was called but calculation is still in process.
|
get |
Indicates if hash generation is currently in process.
|
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.
|
static |
Subscribe to get resulting hash right after it gets calculated.