Class DeviceTimeCheatingDetector
Detects device or system clock manipulation by observing a
Implements
Inherited Members
Namespace: GUPS.AntiCheat.Detector
Assembly: cs.temp.dll.dll
Syntax
public class DeviceTimeCheatingDetector : ADetector
Remarks
The detector subscribes on awake to the GUPS.AntiCheat.Protected.Time.ProtectedTime.
Fields
CurrentUtcTime
The computed UTC time. May differ from
Declaration
public DateTime CurrentUtcTime
Field Value
| Type | Description |
|---|---|
| DateTime |
OnCheatingDetectionEvent
Unity event raised on every detection. Useful to wire up reactions through the inspector without writing an
Declaration
public CheatingDetectionEvent<CheatingDetectionStatus> OnCheatingDetectionEvent
Field Value
| Type | Description |
|---|---|
| CheatingDetectionEvent<CheatingDetectionStatus> |
Properties
IsSupported
Gets a value indicating whether the detector is supported on the current platform.
Declaration
public override bool IsSupported { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Overrides
Name
Gets the human-readable name of the detector.
Declaration
public override String Name { get; }
Property Value
| Type | Description |
|---|---|
| String |
Overrides
PossibleCheatingDetected
Gets a value indicating whether the detector has observed possible cheating activity.
Declaration
public override bool PossibleCheatingDetected { get; protected set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Overrides
ThreatRating
Gets the threat rating reported with every detection. Higher values denote greater perceived threats.
Declaration
public override uint ThreatRating { get; protected set; }
Property Value
| Type | Description |
|---|---|
| System.UInt32 |
Overrides
UseInternetTime
Gets a value indicating whether the detector uses internet time for the application start time.
Declaration
public bool UseInternetTime { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Methods
Awake()
Subscribes to the
Declaration
protected override void Awake()
Overrides
FixedUpdate()
Recalculates CurrentUtcTime from GUPS.AntiCheat.Detector.DeviceTimeCheatingDetector.applicationStartDateTime and the Unity real time since startup.
Declaration
protected virtual void FixedUpdate()
OnApplicationFocus(Boolean)
Recalculates the application start time when the application regains focus.
Declaration
protected virtual void OnApplicationFocus(bool _HasFocus)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | _HasFocus |
|
OnApplicationPause(Boolean)
Recalculates the application start time when the application is unpaused.
Declaration
protected virtual void OnApplicationPause(bool _IsPaused)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | _IsPaused |
|
OnCompleted()
Called when an observed subject signals completion.
Declaration
public override void OnCompleted()
Overrides
OnError(Exception)
Called when an observed subject reports an error.
Declaration
public override void OnError(Exception _Error)
Parameters
| Type | Name | Description |
|---|---|---|
| Exception | _Error | The error reported by the observed subject. |
Overrides
OnNext(IWatchedSubject)
Receives notifications from the subscribed
Declaration
public override void OnNext(IWatchedSubject _Subject)
Parameters
| Type | Name | Description |
|---|---|---|
| IWatchedSubject | _Subject | The status published by the device time monitor. |
Overrides
Start()
Checks for a startup deviation and notifies observers if the device clock differs noticeably from the reference time.
Declaration
protected virtual void Start()