unity-mesh-fracture AGENTS.md

unity-mesh-fracture AGENTS.md is an instructions file for Codex, OpenCode from sinanata/unity-mesh-fracture. It costs 2,647 tokens per session, scanned A, original, MIT.

Repository instructions for a Unity 6 and URP tool that breaks 3D meshes into watertight pieces and can display them as fading debris with optional physics. Unity is a game engine, and URP is its Universal Render Pipeline for drawing scenes.

In plain words
What is it for?
Use them when modifying the mesh-fracturing runtime, integrating it into a Unity game, working with its public API, or checking the project's required conventions.
Why use it?
They explain the project's fixed design choices and prevent agents from adding incompatible technologies, such as Unity's Burst compiler or multithreaded job systems. They also describe how to connect the tool to another project.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Claude Code; mentions AGENTS.md; mentions Codex.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/sinanata/unity-mesh-fracture/agents-md
Clone the repo
git clone --depth 1 https://github.com/sinanata/unity-mesh-fracture

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for unity-mesh-fracture AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/sinanata/unity-mesh-fracture/agents-md.svg)](https://agentmods.dev/instructions/sinanata/unity-mesh-fracture/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/sinanata/unity-mesh-fracture/agents-md"><img src="https://agentmods.dev/badge/instructions/sinanata/unity-mesh-fracture/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,647 This file is loaded in full into every session.
When invoked 2,647 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02647 $0.02647
Opus 5 $0.01324 $0.01324
Sonnet 5 $0.00529 $0.00529
Haiku 4.5 $0.00265 $0.00265

Measured 6d ago against content hash 0b95289fb41d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

unity-mesh-fracture AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

Guidance for AI coding agents (Codex, Cursor, GitHub Copilot, Claude Code, Windsurf, Aider, Zed, and others) working in this repository or wiring this tool into another project. Humans: this is a fast, accurate map. Deeper docs are linked at the bottom.

What this project is

A drop-in Voronoi mesh fracturer for Unity 6 + URP. Pure-C# fragmentation (zero dependencies beyond UnityEngine) that pre-bakes watertight two-submesh fragments — with cooked convex hulls — at load time, then plays them as a fade-out debris burst with optional Unity physics. The entire runtime is three files under Assets/MeshFracture/Runtime/. Namespace: MeshFracture. License: MIT. Battle-tested in the shipping cross-platform game Leap of Legends, where every character that explodes runs through this pipeline.

Golden rules (do not violate)

  1. "Burst" here is the explosion, not Unity's Burst compiler. FractureBurst is a plain MonoBehaviour; the whole runtime is single-threaded managed C# over UnityEngine types (Mesh, Vector3, List<T>, Quaternion). Do not add [BurstCompile], IJob*, NativeArray<T>, Unity.Mathematics.float3, or using Unity.Collections / Unity.Burst / Unity.Jobs. None are dependencies; none are used. Pattern-matching "Burst mesh fracture" onto the DOTS/Jobs stack is the single most common wrong turn here.
  2. Everything runs on the main thread; bake at load, look up at impact. MeshFragmenter.Fragment is a synchronous, O(n²)-in-fragment-count CPU call. Never call it per-impact during gameplay. Use FragmentCache.RequestPreBake (async, one bake per frame) or FragmentCache.BakeSynchronous (blocking, loading-screen only) at load time, then FragmentCache.TryGet at the moment of impact. TryGet returning false means "not baked yet" — fall back to a particle/smoke puff, don't block.
  3. Source meshes must be Read/Write-enabled. Fragment reads source.vertices / normals / uv / triangles; on a non-readable imported mesh those come back empty and you get a single-fragment fallback. Enable Read/Write on the model importer (the demo's DemoModelImporter does this for its FBXes).
  4. Fragment materials must be transparent and owned per-burst. Initialize animates _BaseColor.a 1 → 0 by mutating the material instance directly (MaterialPropertyBlock overrides are silently dropped on some URP / SRP-Batcher / WebGL combinations). Hand each burst its own Material instances (new Material(interiorMat)), configured transparent + Cull Off + ZWrite ON — copy MaterialFactory.ConfigureFractureTransparent. ZWrite must stay ON, or solid chunks render see-through-to-interior.
  5. Two submeshes per fragment: submesh 0 = exterior (the original textured surface), submesh 1 = cap/interior (raw cut faces). Always pass both an exterior and an interior material to Initialize.
  6. No custom .shader assets. The runtime ships zero .shader and zero .mat files on purpose — a hand-rolled URP shader rendered every fragment solid black on WebGL2 (an HLSL → GLSL ES 3.0 cross-compile bug). Stock URP/Lit configured at runtime sidesteps it. Do not reintroduce a custom shader.
  7. No using LeapOfLegends.* or other product-specific imports. New runtime code lives in the MeshFracture namespace only; demo-only code lives under MeshFractureDemo.

Read the full file on GitHub · 119 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 119 lines · 2,647 tokens per session scan A 0b95289fb41d

Subscribe to this mod's changes

unity-mesh-fracture AGENTS.md is an instructions file published in the GitHub repository sinanata/unity-mesh-fracture (46 stars, last pushed 1mo ago), licensed MIT. It adds 2,647 tokens to every session, about $0.0132 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

unity-cli-loop AGENTS.md

AGENTS.md instructions for hatayama/unity-cli-loop, covering architecture overview, repository map, cli / unity package compatibility, project runner pin and generated skill files.

hatayama/unity-cli-loop · 3,322 tokens

Aspid.FastTools CLAUDE.md

Claude Code instructions for VPDPersonal/Aspid.FastTools, covering обзор репозитория, сборка, архитектура, карта функциональности and соглашения по коду редактора.

VPDPersonal/Aspid.FastTools · 2,948 tokens

unity-cli CLAUDE.md

Claude Code instructions for bigdra50/unity-cli, covering claude.md, project overview, commands, install globally (provides: unity-cli, u, unity commands) and run relay server standalone.

bigdra50/unity-cli · 985 tokens

unity-cli-loop CLAUDE.md

Claude Code instructions for hatayama/unity-cli-loop, a project described as: Let AI Drive Unity, from Editor to Play Mode.

hatayama/unity-cli-loop · 3 tokens

Unity-MCP copilot-instructions.md

Copilot instructions for IvanMurzak/Unity-MCP, covering project guidelines, critical rules, no c# reflection for private access, code review and code style.

IvanMurzak/Unity-MCP · 895 tokens

mcp-unity AGENTS.md

AGENTS.md instructions for CoderGamester/mcp-unity, covering mcp unity — ai agent guide (mcp package), purpose (what this repo is), how it works (high-level data flow), key defaults & invariants and repo layout (where to change what).

CoderGamester/mcp-unity · 2,750 tokens