Anti-Cheat Toolkit  2023.2.6
Multi-purpose anti-cheat solution for Unity Engine
ObscuredFileReadResult Struct Reference

Public Member Functions

override string ToString ()


bool Success [get]
byte[] Data [get]
bool CheatingDetected [get]
bool DataIsNotGenuine [get]
bool DataFromAnotherDevice [get]
ObscuredFileError Error [get]
bool IsValid [get]

Detailed Description

Contains ObscuredFile read operation results.

Member Function Documentation

◆ ToString()

override string ToString ( )

Returns contents of this operation result.

Human-readable operation result.

Property Documentation

◆ Success

bool Success

Returns true in case Data is not null and Error's ErrorCode is ObscuredFileErrorCode.NoError, returns false otherwise.

NOTE: it will be false if data is not genuine or was loaded from another device even if Data itself was read successfully and not null. Listen to the NotGenuineDataDetected and DataFromAnotherDeviceDetected events (at ObscuredFile or ObscuredFilePrefs) or check CheatingDetected, DataIsNotGenuine and DataFromAnotherDevice properties explicitly to react on the possible cheating.

◆ Data

byte [] Data

Contains read bytes. Will be null if data was damaged, file does not exists or device lock feature prevented data read.

◆ CheatingDetected

bool CheatingDetected

Indicates either DataIsNotGenuine or DataFromAnotherDevice is true.

◆ DataIsNotGenuine

bool DataIsNotGenuine

Returns true if saved data has correct header but signature does not matches file contents. Returns false otherwise.

◆ DataFromAnotherDevice

bool DataFromAnotherDevice

Returns true if device lock feature detected data from another device.

◆ Error

ObscuredFileError Error

Contains specific error in case Success is not true but IsValid is true.

◆ IsValid

bool IsValid

Returns true if this struct was filled with actual data, otherwise will stay false.