• Hello
Search Results for

    Show / Hide Table of Contents

    Detector

    A detector decides if something looks like cheating. It looks at what a monitor reports, or it runs its own check.

    When it finds something, it tells the Anti-Cheat Monitor. That is the main object in your scene. It adds the report to a threat score, a number that grows with every find.

    The Free version includes the PrimitiveCheatingDetector and the MobileGenuineDetector. All other detectors need Pro.

    The Anti-Cheat Monitor lists the detectors on it.

    Add a detector

    Each detector comes as a ready-made prefab. Drag it onto the Anti-Cheat Monitor so it becomes a child. If the detector needs a monitor, the prefab already includes it.

    The detector prefabs in Assets/GUPS/AntiCheat/Resources/Prefabs/Detectors.

    Pick the detectors from the tables below. You only need the ones that fit your game and platform.

    What happens when a detector finds something

    A detector does not punish anyone. You choose the reaction:

    • In the Inspector: every detector has an On Cheating Detection Event. Assign a method there, like on a button's OnClick.
    • In code: ask the detector, or listen to it.
    • With a punisher: it reacts on its own when the threat score gets high enough.

    In code, you can ask a detector if it found something:

    var detector = AntiCheatMonitor.Instance.GetDetector<PrimitiveCheatingDetector>();
    
    if (detector != null && detector.PossibleCheatingDetected)
    {
        // A protected value was changed at least once.
    }
    

    Or listen, so your code runs at the moment of the find:

    public class CheatingLogger : IObserver<IDetectorStatus>
    {
        public void OnNext(IDetectorStatus status)
        {
            Debug.LogWarning($"Cheat detected. Threat: {status.ThreatRating}");
        }
    
        public void OnError(Exception error) { }
        public void OnCompleted() { }
    }
    
    detector.Subscribe(new CheatingLogger());
    

    For most detectors, PossibleCheatingDetected stays true after the first find. The game-time and device-time detectors are different: they clear that flag when the clock looks normal again.

    Guide: Reacting to cheating.

    Testing in the Unity Editor

    Note

    Desktop, Android, and iOS checks skip development builds and the Unity Editor. So a detector can stay quiet while you test. Turn on Verify development builds for that platform in Edit > Project Settings > GuardingPearSoftware > AntiCheat to run the checks there too.

    Universal

    These run on every platform.

    Detector Free Pro What it catches
    PrimitiveCheatingDetector + + A protected value that was changed in memory
    GameTimeCheatingDetector + A sped up, slowed, or stopped game clock
    DeviceTimeCheatingDetector + A device clock that was moved
    InputCheatingDetector + A button pressed faster than a person can

    Mobile

    These run on Android and iOS.

    Detector Free Pro What it catches
    MobileGenuineDetector + + A build whose package name is no longer yours. The package name is the id of your app, such as com.company.game

    Android

    These run on Android.

    Detector Free Pro What it catches
    AndroidPackageTamperingDetector + A repacked app, which is your app changed and built again by someone else: wrong file, wrong signature, or extra libraries
    AndroidDeviceCheatingDetector + Known cheat apps installed on the phone

    iOS

    These run on iOS.

    Detector Free Pro What it catches
    IOSJailbreakDetector + Signs that the iPhone or iPad is jailbroken. A jailbreak removes Apple's limits, so cheat tools can run

    Install source

    One detector for Android, iOS, Windows, macOS, and Linux. Unity 6 and newer only.

    Detector Free Pro What it catches
    PackageSourceDetector + An install from a store or channel you do not allow

    Desktop

    These run on Windows, macOS, and Linux standalone builds.

    Detector Free Pro What it catches
    DesktopModLoaderDetector + Mod loaders such as BepInEx or MelonLoader. A mod loader adds other people's code to your game
    DesktopDebuggerDetector + A debugger attached to the game. A debugger is a tool that can pause the game and read or change it
    DesktopVirtualEnvironmentDetector + The game running inside a virtual machine, a computer simulated by software
    DesktopInstanceLockDetector + A second copy of the game running on the same computer. Off until you turn on Lock to a single instance in the project settings

    Next

    A detector only reports. To react on its own when the threat score gets high, go to the Punisher overview.


    Back to the overview.

    In This Article
    Back to top GuardingPearSoftware documentation