Anti-Cheat Toolkit
2024.3.3
Multi-purpose anti-cheat solution for Unity Engine
|
Classes | |
class | DeviceIdHolder |
class | DeviceLockSettings |
class | ObscuredFile |
struct | ObscuredFileError |
struct | ObscuredFileReadResult |
struct | ObscuredFileWriteResult |
class | ObscuredFilePrefs |
class | EncryptionSettings |
interface | IObscuredFileSettings |
class | ObscuredFileSettings |
class | ObscuredPrefs |
Enumerations | |
enum class | StorageDataType : byte { Unknown = 0 , SByte = 1 , Byte = 2 , Int16 = 3 , UInt16 = 4 , Int32 = 5 , UInt32 = 10 , Int64 = 30 , UInt64 = 32 , Char = 33 , Single = 20 , Double = 25 , Decimal = 27 , BigInteger = 28 , Boolean = 35 , String = 15 , DateTime = 37 , ByteArray = 40 , Vector2 = 45 , Vector2Int = 47 , Vector3 = 50 , Vector3Int = 51 , Vector4 = 53 , Quaternion = 55 , Color = 60 , Color32 = 62 , Rect = 65 , RectInt = 67 , RangeInt = 70 , Matrix4x4 = 78 , Ray = 80 , Ray2D = 83 } |
enum class | DeviceLockLevel : byte { None , Soft , Strict } |
enum class | DeviceLockTamperingSensitivity : byte { Disabled , Low , Normal } |
enum class | ObscuredFileErrorCode : byte { NoError = 0 , FileNotFound = 5 , FileDamaged = 10 , DataIsNotLocked = 15 , NotInitialized = 20 , OtherException = 250 } |
enum class | ObscurationMode : byte { Plain = 0 , Encrypted = 1 } |
enum class | ObscuredFileLocation : byte { PersistentData = 5 , Custom = 10 } |
|
strong |
Data types supported by ObscuredPrefs and ObscuredFilePrefs.
Enumerator | |
---|---|
Unknown | Reserved for unsupported types. |
SByte | |
Byte | |
Int16 | |
UInt16 | |
Int32 | |
UInt32 | |
Int64 | |
UInt64 | |
Char | |
Single | |
Double | |
Decimal | |
BigInteger | |
Boolean | |
String | |
DateTime | |
ByteArray | Array of System.Byte |
Vector2 | |
Vector2Int | |
Vector3 | |
Vector3Int | |
Vector4 | |
Quaternion | |
Color | |
Color32 | |
Rect | |
RectInt | |
RangeInt | |
Matrix4x4 | |
Ray | |
Ray2D |
|
strong |
Used to specify level of the device lock feature strictness.
Use it to prevent cheating via 100% game saves sharing or sharing purchased in-app items for example.
Relies on SystemInfo.deviceUniqueIdentifier when not using custom DeviceIdHolder.DeviceId.
Please note, deviceUniqueIdentifier may change in some rare cases, so one day all locked data may became inaccessible on same device.
WARNING: On iOS use at your peril with default DeviceId! There is no reliable way to get persistent device ID on iOS. So avoid using it or use in conjunction with DeviceIdHolder.DeviceId (see below).
NOTE #1: On iOS it tries to receive vendorIdentifier in first place, to avoid device id change while updating from iOS6 to iOS7. It leads to device ID change while updating from iOS5, but such case appears much rarer.
NOTE #2: You may use own device id via DeviceIdHolder.DeviceId property to make it more reliable and predictable. Use it to lock saves to the specified email for example.
NOTE #3: Main thread may lock up for a noticeable time while obtaining device ID first time on some devices. Consider using DeviceIdHolder.ForceLockToDeviceInit() at loading screen or other desirable stall moment of your app to prevent undesirable behavior in such cases.
|
strong |
Controls device lock tampering sensitivity - from fully functional to full tampering ignorance. Emits DataFromAnotherDeviceDetected event when detecting data from another device.
|
strong |
Possible error codes for the file read operation.
Enumerator | |
---|---|
NoError | Indicates no errors happened. |
FileNotFound | Indicates file to read from wasn't found. |
FileDamaged | Indicates file header was damaged. |
DataIsNotLocked | Indicates read data was not locked but you are using DeviceLockLevel.Strict which prevents reading such files. |
NotInitialized | Indicates used tool wasn't properly initialized. See error logs for more information. |
OtherException | Indicates some other exception occured, see ObscuredFileError.Exception for details. |
|
strong |
|
strong |
Specifies file location.
Enumerator | |
---|---|
PersistentData | Corresponds to the Application.persistentDataPath. |
Custom | Allows setting custom file path. |