# FrameDoctor Unity Plugin

AI-powered Unity Profiler analysis. Capture profiler data and get actionable optimization recommendations.

## Installation

### Via Package Manager (Recommended)

1. Open the Package Manager (Window > Package Manager)
2. Click the "+" button in the top left
3. Select "Add package from git URL..."
4. Enter: `https://github.com/framedoctor/framedoctor.git?path=packages/framedoctor`

### Via Local Path

1. Clone or download this repository
2. In Unity, open Package Manager
3. Click "+" > "Add package from disk..."
4. Navigate to `packages/framedoctor/package.json`

## Requirements

- Unity 2021.3 or later
- .NET Standard 2.1 or later

## Usage

### Opening the Window

Go to **Window > FrameDoctor** to open the FrameDoctor editor window.

### Capturing Profiler Data

1. Click "Start Capture" to begin recording profiler data
2. Run your game or the scene you want to profile
3. Click "Stop & Export" to save the profiler data

### Analyzing with AI

1. After exporting, click "Analyze with AI"
2. Your default browser will open to framedoctor.io
3. Upload your exported CSV files
4. Get AI-powered optimization recommendations

## Features

- **One-Click Capture**: Easily start and stop profiler recording
- **Auto-Export**: Automatically exports profiler data to CSV format
- **Seamless Integration**: Opens web analysis directly from the editor
- **Custom Settings**: Configure capture duration, sample rate, and more

## Settings

Access settings via **Edit > Preferences > FrameDoctor** or the gear icon in the FrameDoctor window.

- **Export Path**: Where to save exported profiler data
- **Auto-Open Browser**: Automatically open browser after export
- **Capture Duration**: Maximum capture time (0 for unlimited)

## License

MIT License - see [LICENSE.md](LICENSE.md) for details.
