Real-timeMacro Detectionfor Mobile Games

A security solution that analyzes Android MotionEvent data in real-time to detect macros, auto-clickers, and automation tools while protecting game integrity.

Android API 21+
Unity 2021.3+
Obfuscated
99%+
Detection Rate
<1ms
Frame Overhead
<1%
False Positives
10min
Integration
Detection Modes

Three Response Modes

Flexible response strategies to balance game security and user experience for any situation.

detect

Passive Monitoring

Only detects and fires events. Ideal for analysis and monitoring purposes.

  • Real-time event logging
  • Server-side analytics
  • User behavior pattern collection
block

Active Protection

Displays a warning and safely terminates the app when macros are detected. Recommended for production.

  • Custom warning UI
  • Configurable delay (0-10s)
  • Safe app termination
none

Development Mode

Disables all detection features. Use this for development and testing environments.

  • Complete detection bypass
  • Development optimized
  • Easy debugging
System Architecture

Modular Architecture

Clear separation of concerns and extensible design for easy maintenance and customization.

Unity Application Layer
MacroDetector
Main Class
MotionEventDetector
MonoBehaviour
SecurityWarningDisplay
Warning UI
Bridge Layer
UnityWindowCallback
AndroidJavaProxy
Android Native Layer
Window.Callback
dispatchTouchEvent
MacroDetector.Base
Common type definitions
4 KB
MacroDetector.Settings
Configuration management
4.6 KB
MacroDetector.SDK
Core detection logic
31.2 KB
MacroDetector.Editor
Editor extensions
~10 KB
Quick Start

Integrate in 30 Minutes

Add security features to your game quickly with a simple API and automatic configuration.

GameManager.cs
using MacroDetector.SDK;
using UnityEngine;

public class GameManager : MonoBehaviour
{ 
    private MacroDetector detector;

    void Start()
    { 
        // Initialize detector
        detector = new MacroDetector();

        // Subscribe to detection events
        detector.MacroDetected += OnMacroDetected;

        // Start monitoring
        detector.Start();
    } 

    void OnMacroDetected(object sender,
        MacroDetectedEventArgs e)
    { 
        Debug.Log($"Macro detected! Action: {e.Action}");
        // Send to server, apply sanctions, etc.
    } 
}
01

Copy DLL Files

Copy MacroDetector DLL files to your Plugins folder

02

Create Settings Asset

Run Tools > MacroDetector > Create Settings Asset menu

03

Configure Response Mode

Select detect/block/none mode in the Inspector

04

Integrate Code

Initialize MacroDetector in your game start script

05

Build & Test

Test detection features on an Android device

Security

Enterprise-Grade Security

Code Obfuscation

DLL obfuscation via Obfuscar

String Protection

Critical string encryption

Memory Protection

Safe AndroidJavaProxy cleanup

Anti-Reversing

Core detection logic protection

Strengthen Your Game Security

Protect your game from macros and automation tools with MacroDetector and create a fair play environment.