unity-refresh-iterate

A Unity editor workflow for applying code or shader changes, checking the editor log, and inspecting a captured game frame. Unity is a game development tool.

In plain words
What is it for?
Use it to refresh an open Unity project, review new Editor.log entries, capture the game view, and investigate issues with rendering order, depth, attachments, shaders, or frame presentation.
Why use it?
It catches rendering and editor problems that may not appear as console errors. It also helps identify the first underlying defect instead of hiding symptoms.

Cursor rule for Cursor

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 rules/haolange/infinityrenderpipeline/unity-refresh-iterate
Clone the repo
git clone --depth 1 https://github.com/haolange/InfinityRenderPipeline

Made for: Cursor.

Per session 380 This file is loaded in full into every session.
When invoked 380 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 $0.00380 $0.00380
Opus 5 $0.00190 $0.00190
Sonnet 5 $0.00076 $0.00076
Haiku 4.5 $0.00038 $0.00038

Measured 2d ago against content hash 029f49363faf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

unity-refresh-iterate 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 2d 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.

.cursor/rules/unity-refresh-iterate.mdc · 18 lines

What it actually says

Unity Refresh + Log + Frame Iterate

After any InfinityRP code/shader change, do not wait for the user to compile.

  1. Confirm the open editor via D:\Projects\Unity\InfinityExample\Library\EditorInstance.json. Do not launch a second Unity or -batchmode while that editor is open.
  2. Foreground that Unity window and trigger Assets > Refresh (Ctrl+R) using Tools/RefreshUnityEditor.ps1.
  3. Wait until D:\Projects\Unity\InfinityExample\Logs\Editor.log grows past the pre-refresh mark and then stays stable.
  4. Diagnose only new log after the mark. Fix the first real owner/order/lifetime/shader-contract defect.
  5. Capture the frame with Tools/CaptureUnityWindow.ps1 and inspect the image. Console-clean is not render-correct: a depth-clear regression once held the Console at 0 errors while the Game view rendered nothing. Always capture after touching clears, depth, attachments, pass order, or present.
  6. Forbidden as a "fix": if (shader == null) return in execute, dummy textures, disabling a designed path to silence Console, fake history, or count = 0 dispatches.
  7. Unimplemented features must not be recorded. Required producers (Lighting, TAA when that path is active, Display) must fail at record/setup if their contract is broken.
  8. Repeat refresh → log → frame → first-principles fix until the new log window has no InfinityRP flood and the captured frame is correct. Keep TODO(UNVERIFIED) on any result that was checked by log only.
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. 2d ago First seen · 18 lines · 380 tokens per session scan A 029f49363faf

Subscribe to this mod's changes

unity-refresh-iterate is a cursor rule published in the GitHub repository haolange/InfinityRenderPipeline (271 stars, last pushed 16d ago), licensed MPL-2.0. It adds 380 tokens to every session, about $0.0019 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.