Mesh Line 2D is a high-performance tool for drawing procedural lines and contours in Unity. It overcomes the limitations of the standard LineRenderer by generating clean mesh geometry with proper UVs, allowing for textured lines, rounded corners, and high-quality outlines.
Perfect for 2D games, UI elements in world space, graphs, trajectories, custom typography (letters/numbers), and tracing mechanics (draw-along gameplay).
Powerful scene editor: Edit your lines directly in the Scene View without leaving the context of your game.
- Intuitive Editing: Add, remove, and move points effortlessly.
- Smart Magnetic Snapping: Unique system that snaps points horizontally, vertically, or diagonally (45°) relative to their neighbors. Perfect for precision drawing.
- Pivot Control: Auto-center the pivot or set any specific point as the custom pivot with a single click.
- Undo/Redo: Full support for Unity's native Undo system.
Visual features:
- Bezier Curves: Full geometry control with Free, Corner, and Smooth point types.
- Textures & Styles: Render lines with solid colors or Textures. Supports Tiling and Static modes with precise Offset control.
- Outlines: Add a border outline with adjustable width and color in a single pass.
- Fill Amount: Control the drawing progress (0 to 1). Ideal for animated effects, health bars, or tracing logic.
Rendering & Collision:
- Collider Generation: Automatically generate a PolygonCollider2D that perfectly matches your line's shape with one button press.
- Sorting & Layers: Full control over Sorting Layers and Order in Layer directly from the inspector.
- Masking Support: Fully compatible with Unity Sprite Masks (Stencil buffer interaction).
Perfomance:
- Zero GC Allocations: Runtime mesh updates use cached memory buffers to prevent garbage collection spikes.
- Mobile Ready: Highly optimized mesh generation algorithm.
- Global Settings: Use ScriptableObject profiles to maintain consistent line styles across your entire project.
Upgrade your lines from pixelated artifacts to crisp, professional meshes with Mesh Line 2D.
⚠ Note: This tool renders meshes in World Space. It is not designed for the Unity UI (Canvas) system.