• Hello
Search Results for

    Show / Hide Table of Contents

    Class GameTimeCheatingDetector

    Detects speed hacks and fixed-delta tampering, and keeps a corrected clock for ProtectedTime.

    Inheritance
    System.Object
    ADetector
    GameTimeCheatingDetector
    Implements
    IDetector
    Inherited Members
    ADetector.IsActive
    ADetector.Subscribe(IObserver<IDetectorStatus>)
    ADetector.Notify(IDetectorStatus)
    ADetector.Dispose()
    Namespace: GUPS.AntiCheat.Detector
    Assembly: cs.temp.dll.dll
    Syntax
    public class GameTimeCheatingDetector : ADetector
    Remarks

    Listens to the on the same . Every 25 reports (about 2.5 s) a strict majority confirms a speed hack, and one tampered physics step confirms fixed-delta cheating. A clean window clears the detection. From the first deviating report, protected time follows real time, stays within one reference tick of it, and does not snap back to Unity.

    Fields

    OnCheatingDetectionEvent

    Raised for every window that confirms cheating. Wire a reaction in the inspector without writing an observer.

    Declaration
    public CheatingDetectionEvent<CheatingDetectionStatus> OnCheatingDetectionEvent
    Field Value
    Type Description
    CheatingDetectionEvent<CheatingDetectionStatus>

    Properties

    DeltaTimeCheatingDetected

    Gets whether the most recent evaluated window confirmed clock speed manipulation.

    Declaration
    public bool DeltaTimeCheatingDetected { get; }
    Property Value
    Type Description
    System.Boolean

    FixedDeltaTimeCheatingDetected

    Gets whether the most recent evaluated window contained fixed delta time manipulation.

    Declaration
    public bool FixedDeltaTimeCheatingDetected { get; }
    Property Value
    Type Description
    System.Boolean

    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
    ADetector.IsSupported

    Name

    Gets the human-readable name of the detector.

    Declaration
    public override String Name { get; }
    Property Value
    Type Description
    String
    Overrides
    ADetector.Name

    PossibilityOfFalsePositive

    False-positive likelihood sent with each detection. Hitches and scene loads do not move the reference clock, so this stays moderate.

    Declaration
    public float PossibilityOfFalsePositive { get; }
    Property Value
    Type Description
    System.Single

    PossibleCheatingDetected

    Gets whether the most recent evaluated window confirmed cheating of any kind. Cleared again by a clean window.

    Declaration
    public override bool PossibleCheatingDetected { get; protected set; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    ADetector.PossibleCheatingDetected

    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
    ADetector.ThreatRating

    TimeDeviation

    Latest clock deviation. when the last window did not confirm a speed hack.

    Declaration
    public ETimeDeviation TimeDeviation { get; }
    Property Value
    Type Description
    ETimeDeviation

    Methods

    Awake()

    Subscribes to the on this and hooks scene loading.

    Declaration
    protected override void Awake()
    Overrides
    ADetector.Awake()

    OnCompleted()

    Called when an observed subject signals completion.

    Declaration
    public override void OnCompleted()
    Overrides
    ADetector.OnCompleted()

    OnDestroy()

    Unsubscribes from the monitor and unhooks scene loading.

    Declaration
    protected virtual void OnDestroy()

    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
    ADetector.OnError(Exception)

    OnLevelFinishedLoading(Scene, LoadSceneMode)

    Resets the protected time since level load when a new scene is loaded.

    Declaration
    protected virtual void OnLevelFinishedLoading(Scene _Scene, LoadSceneMode _Mode)
    Parameters
    Type Name Description
    Scene _Scene

    The loaded scene.

    LoadSceneMode _Mode

    The scene loading mode.

    OnNext(IWatchedSubject)

    Stores one monitor report and evaluates the window once it is full.

    Declaration
    public override void OnNext(IWatchedSubject _Subject)
    Parameters
    Type Name Description
    IWatchedSubject _Subject

    The status published by the game time monitor.

    Overrides
    ADetector.OnNext(IWatchedSubject)

    Update()

    Advances the protected clock. Runs early so ProtectedTime stays constant for the rest of the frame, like .

    Declaration
    protected virtual void Update()

    Implements

    IDetector

    See Also

    AntiCheatMonitor
    In This Article
    Back to top GuardingPearSoftware documentation