• Hello
Search Results for

    Show / Hide Table of Contents

    Class ModLoaderDetector

    Detects whether a third party mod loader (BepInEx, MelonLoader, UnityDoorstop, UnityExplorer, ...) has been injected into the running game.

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

    Performs three kinds of scans: a managed assembly sweep over for assemblies whose name matches one of the configured prefixes, a native module sweep via plus a managed sweep, and a file system sweep next to the game executable for typical mod loader artifacts.

    Detection cannot prevent a mod loader from loading - mod loaders run before any C# code in the player. The detector can only react after the fact by raising the threat level via Notify(IDetectorStatus) so the configured punisher chain (e.g. ExitGamePunisher) can quit the game.

    Fields

    CheckOnlyOnGameStart

    Run the mod loader scan only once on game start. Disable to also run a periodic recheck. The scans are cheap but parsing every loaded module on every interval is not free.

    Declaration
    public bool CheckOnlyOnGameStart
    Field Value
    Type Description
    System.Boolean

    OnCheatingDetectionEvent

    Unity event raised on every detection. Useful to wire up reactions through the inspector without writing an .

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

    RecheckIntervalForPossibleCheating

    Interval in seconds between mod loader scans.

    Declaration
    public float RecheckIntervalForPossibleCheating
    Field Value
    Type Description
    System.Single

    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
    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

    Gets the false-positive likelihood 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
    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

    Methods

    ManualScan()

    Performs all enabled scans once and notifies observers if any evidence is found.

    Declaration
    public bool ManualScan()
    Returns
    Type Description
    System.Boolean

    true if any evidence of a mod loader was found; otherwise false.

    OnCompleted()

    Called when an observed subject signals completion.

    Declaration
    public override void OnCompleted()
    Overrides
    ADetector.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
    ADetector.OnError(Exception)

    OnNext(IWatchedSubject)

    Called when an observed subject publishes a new status.

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

    The status published by the observed subject.

    Overrides
    ADetector.OnNext(IWatchedSubject)

    Start()

    Caches the platform probe, runs the first scan and starts the periodic recheck loop.

    Declaration
    protected virtual void Start()

    Implements

    IDetector

    See Also

    AntiCheatMonitor
    In This Article
    Back to top GuardingPearSoftware documentation