Documentation

Overview

discard is an external Unity game script injector designed for research, experimentation, and controlled runtime interaction. It operates outside the target process and avoids direct binary modification.

Requirements

• Windows 10 / 11
• Unity-based target application
• Administrator privileges (recommended)
• Games MUST be BepinEx patched.

Architecture

The injector is structured around a minimal external controller responsible for:

• Process discovery
• Memory interaction
• Script loading and execution
• Runtime cleanup


How it works

Injection

Internally, discard.top will scan for games running Unity.

Upon selecting a detected game, discard.top will inject our DLL, establishing communication between the UI and the game.

Execution

When you click the "execute" button, the UI will send your code to the game.

We then compile your code with all the needed dependencies, and run it within the game.


Basic Usage

Launch the target Unity application, and click "inject" in the UI. Once attached, scripts can be loaded dynamically at runtime.

// Example
Console.WriteLine("Hello world!");
Filesystem.WriteFile("C:\\discard.txt", "Hello from discard.top!");
MessageBox(IntPtr.Zero, "Hello", "Hello from discard.top", 0);

API · Initialization

Handles injector startup, configuration loading, and initial process scanning.

API · Process

Provides APIs to launch, stop, and query processes.

API · Memory

Low-level memory read/write abstractions with safety guards and cleanup handling.

API · Scripting

Script loading, execution, isolation, and lifecycle management at runtime.

Notes & Disclaimer

This project is provided for educational and research purposes only. Use responsibly and only on applications you own or have permission to analyze.