Anti-Cheat Toolkit  2023.2.6
Multi-purpose anti-cheat solution for Unity Engine
DeviceIdHolder Class Reference

Static Public Member Functions

static void ForceLockToDeviceInit ()
 

Properties

static string DeviceId [get, set]
 

Detailed Description

Used by ObscuredPrefs and ObscuredFile for the device lock feature.

Member Function Documentation

◆ ForceLockToDeviceInit()

static void ForceLockToDeviceInit ( )
inlinestatic

Allows forcing device id obtaining on demand. Otherwise, it will be obtained automatically on first usage.

Device id obtaining process may be noticeably slow when called first time on some devices.
This method allows you to force this process at comfortable time (while splash screen is showing for example).

Call this if you going to use ObscuredFile or ObscuredFilePrefs from non-main thread while using Lock To Device feature without custom DeviceId to avoid exception due to Unity API access from non-main thread.

Property Documentation

◆ DeviceId

string DeviceId
staticgetset

Allows getting current device ID or setting custom device ID to lock data to the device.

WARNING: All data saved with previous device ID will be considered foreign!