Quickly bundle and copy C# scripts directly to your clipboard without an IDE. Strip comments and map assembly dependencies to streamline external reviews, documentation, and text exports.The CleanScript Exporter is a time-saving Unity Editor utility designed to instantly collate and export C# scripts without the friction of opening an external IDE. Opening multiple scripts in standard code editors just to copy their contents is a tedious, time-consuming bottleneck. This tool bypasses that entirely, allowing developers to drag and drop entire folders or specific files directly into a Unity window for immediate clipboard access. While its primary function is rapid, IDE-less text extraction, it is augmented with powerful optimization features—including comment stripping and dependency mapping—to output clean, bounded text payloads.Note: Once imported, this tool operates under its internal engineering name which is "Context Bundler". Access it via the top menu: Tools > Veridian > Context Bundler. .Core Workflow & InterfaceInstant Staged Queue: Drag and drop folders or individual .cs files directly into the window. The tool recursively searches directories and populates a staging queue, keeping updated versions of your scripts ready to be copied instantly.IDE-Free Extraction: Select entire modules and instantly copy the combined C# logic directly to your clipboard or local drive, completely bypassing external editor load times.Safe Comment Stripping: A custom Regex-driven engine allows you to globally or individually strip legacy inline (//) and block (/* */) comments to reduce the overall text footprint. An optional setting intelligently preserves structural C# XML documentation (///).Custom Instruction Preamble: Prepend high-level directives to the top of your exported file using a version-controlled InstructionPresetLibrary (ScriptableObject) to save, share, and inject standardized export instructions.Architecture & Dependency Mapping: The tool natively reads Unity's CompilationPipeline data to generate a Markdown-formatted map of all staged assemblies (.asmdef) and their explicit one-way dependencies.Primary Use Cases1. Collaboration & Asynchronous Peer ReviewWhen collaborating with external contractors or conducting peer code reviews, sending an entire multi-gigabyte Unity project repository is impractical. The CleanScript Exporter allows lead engineers to grab a specific feature module, strip redundant legacy comments, and instantly output a single, clean .md file. This provides the reviewer with the exact, bounded context they need without exposing the proprietary codebase or forcing anyone to manually aggregate files.2. Rapid LLM Context PreparationFor developers utilizing Large Language Models (LLMs) for code analysis, refactoring, or generation, gathering context is often a frustrating process. Opening five different scripts in an IDE simply to copy and paste their text wastes valuable time. The CleanScript Exporter solves this by acting as an instantaneous context-window engine directly inside Unity.Frictionless Copying: Drag a feature folder into the tool and instantly copy the codebase to your clipboard in a single click, keeping your workflow fast and uninterrupted.Token Footprint Optimization: By utilizing the comment stripper and preserving only structural XML, developers significantly reduce the character footprint of their payload, saving valuable token bandwidth for the actual API response.System Prompt Injection: The Instruction Library acts as a centralized repository for system prompts, ensuring consistent LLM constraints across the studio without having to retype them.Preventing Architectural Hallucinations: By prepending the Architecture & Dependency Map, the LLM reads the one-way dependency flow of your architecture first. It is explicitly instructed to adhere to these boundaries, effectively constraining the model from generating code that assumes access to isolated namespaces or creates circular dependencies.3. Project DocumentationThe tool serves as a rapid generator for internal technical documentation, allowing teams to instantly bundle module logic and structural boundaries into text formats suitable for Git wikis or internal knowledge bases.Package ExpectationsEditor-Only: This is strictly an Editor utility and will not affect or bloat runtime application builds.No Demo Scene or Artwork: This package contains only the functional Editor window and background compilation scripts. It does not include demo scenes, 3D models, or artwork.More from Veridian:If you find this tool useful, please consider browsing our publisher page for additional free assets, or reviewing our premium optimization suite below.BurstLOD: Burst-Powered Optimization SuiteBurstLOD is a production-grade decimation and optimization suite engineered for high-performance Unity development. Built entirely on the Unity Job System and Burst Compiler, it provides a complete pipeline for generating, refining, and deploying high-quality mesh LODs without slowing down your workflow.Technical DetailsSeamless Editor IntegrationThe tool is designed to feel like a native part of your Unity workspace, prioritizing practical accessibility and a frictionless workflow before relying on its heavier backend optimizations.Tabbed Workspace & Quick Ingestion: Manage multiple staging queues simultaneously using the persistent tabbed interface. Getting files into the tool is instantaneous: you can drag and drop entire folders or individual .cs scripts directly into the window, or simply highlight assets in your Project view and use the right-click context menu to instantly append them to your active workspace.Minimal Project Footprint: The asset is incredibly lightweight, consisting entirely of a handful of Editor scripts. It resides completely within its own isolated Assembly Definition (.asmdef) and custom namespace. It has strictly zero external dependencies and requires no initial setup.Zero Resource Drain & Safe Removal: The tool is engineered to sit quietly in your project. It consumes absolutely zero CPU or memory resources when the window is closed, and maintains a highly optimized, minimal footprint when open. Because it is strictly an Editor-only tool, it is completely excluded from your runtime builds. If you ever decide you no longer need it, simply delete the asset folder—it leaves no trace, dangling scripts, or broken references behind.Non-Destructive & Persistent: The exporter acts strictly as a read-only formatting engine. It loads files into memory to build the final payload and will never overwrite, truncate, or modify your actual source code on disk. Furthermore, native Unity UI state serialization ensures your active queues and scratchpad drafts safely survive script recompilations (Domain Reloads) without wiping your staged work.Safe Regex Comment Stripping: Comment removal utilizes a compiled Regular Expression engine meticulously designed to identify and preserve string literals ("...", $"...", @"{...}") before searching for comments. This ensures that // or /* characters found inside URLs or debug messages are never accidentally stripped.Assembly Caching & Path Normalization: To prevent Editor freezes during mass drag-and-drop operations, the tool bypasses standard string comparisons by building a lazy-loaded, instantly accessible cache of your project's assemblies. It also sanitizes all ingestion paths, automatically resolving Mac and Windows slash discrepancies so native compilation API lookups function flawlessly. This cache automatically flushes and updates the moment your project hierarchy changes.Technical SpecificationsNamespace: Veridian.ContextBundler.EditorAssembly: Veridian.ContextBundler.Editor.asmdefEnvironment: Unity Editor Only (Safely stripped from all runtime builds).Output Formats: Generates output directly to the system clipboard, or saves to local disk as Markdown (.md) or Plain Text (.txt).Dependencies: None. This tool utilizes standard internal Unity Editor APIs and requires no external packages or libraries.



