• Hello
Search Results for

    Show / Hide Table of Contents

    Class PrimitiveCheatingDetector

    Detects unexpected value modifications of protected primitive types, commonly caused by memory editing tools.

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

    The detector is notified directly by the protected primitives ( implementations) when they observe tampering. It does not poll any subjects on its own.

    Examples

    React to tampering detected by any primitive (e.g. ProtectedInt32) via the inspector-friendly Unity event:

    using GUPS.AntiCheat;
    using GUPS.AntiCheat.Detector;
    
    var detector = AntiCheatMonitor.Instance.GetDetector<PrimitiveCheatingDetector>();
    detector.OnCheatingDetectionEvent.AddListener(status =>
    {
        Debug.LogWarning($"Cheat detected (threat={status.ThreatRating}, fp={status.PossibilityOfFalsePositive}).");
    });

    Fields

    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
    GUPS.AntiCheat.Detector.ADetector<GUPS.AntiCheat.Detector.ICheatingDetectionStatus>.IsSupported

    Name

    Gets the human-readable name of the detector.

    Declaration
    public override String Name { get; }
    Property Value
    Type Description
    String
    Overrides
    GUPS.AntiCheat.Detector.ADetector<GUPS.AntiCheat.Detector.ICheatingDetectionStatus>.Name

    PossibilityOfFalsePositive

    Gets the possibility of a false positive (in the range [0.0, 1.0]) reported with each detection.

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

    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
    GUPS.AntiCheat.Detector.ADetector<GUPS.AntiCheat.Detector.ICheatingDetectionStatus>.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
    GUPS.AntiCheat.Detector.ADetector<GUPS.AntiCheat.Detector.ICheatingDetectionStatus>.ThreatRating

    Methods

    OnCompleted()

    Called when an observed subject signals completion.

    Declaration
    public override void OnCompleted()
    Overrides
    GUPS.AntiCheat.Detector.ADetector<GUPS.AntiCheat.Detector.ICheatingDetectionStatus>.OnCompleted()

    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
    GUPS.AntiCheat.Detector.ADetector<GUPS.AntiCheat.Detector.ICheatingDetectionStatus>.OnError(Exception)

    OnNext(IWatchedSubject)

    Invoked by the protected primitive types when they observe an unexpected modification. Notifies all subscribed observers and listeners of the detected cheating.

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

    The watched subject reporting the modification.

    Overrides
    GUPS.AntiCheat.Detector.ADetector<GUPS.AntiCheat.Detector.ICheatingDetectionStatus>.OnNext(IWatchedSubject)

    Implements

    IDetector<>

    See Also

    AntiCheatMonitor
    In This Article
    Back to top GuardingPearSoftware documentation