unity-optimization

Optimize Unity project assets and analyze scenes for performance bottlenecks.

Updated Aug 31, 2026
One-click install
npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill unity-optimization-pikachu0310
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-optimization
Source: https://github.com/pikachu0310/codex-agent-ops-public/tree/main/.agents/skills/unity-skills/skills/optimization
Command: npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill unity-optimization-pikachu0310

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Unity projects accumulate oversized textures, uncompressed meshes and audio, duplicate materials, and scenes with excessive polygons or overdraw, all of which inflate build size and hurt runtime performance. This Skill provides batch optimization and read-only analysis tools to find and fix these issues directly in the Unity Editor. ## Core Features & Use Cases - Batch Asset Compression: Adjust texture max size and crunch compression, mesh compression levels, and audio compression formats across filtered asset sets in one call. - Scene Analysis: Detect high-poly meshes, excessive material slots, duplicate materials, large assets over a size threshold, and transparent objects causing overdraw. - Static Flags & LOD Setup: Read and set StaticEditorFlags on GameObjects and configure LOD Groups with screen-relative transition distances. - Use Case: Before a release build, run optimize_find_large_assets to list textures over 1024 KB, then run optimize_textures with a maxTextureSize of 1024 to shrink them, and finally run optimize_analyze_scene to confirm no renderer exceeds the triangle threshold. ## Quick Start Analyze the current Unity scene for high-poly meshes and excessive materials, then list all assets larger than 1024 KB.

Frequently Asked Questions about unity-optimization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce Unity build size by compressing textures?

Use optimize_textures to batch-set max texture size, crunch compression, and compression quality across assets matching an optional filter. It returns the count and list of modified textures so you can review changes before proceeding.

How to find large assets in a Unity project?

Call optimize_find_large_assets with a size threshold in KB and an optional asset type filter such as Texture2D or AudioClip. It returns up to a configurable limit of assets exceeding the threshold.

Can I batch set static flags on Unity GameObjects?

Yes, optimize_set_static_flags accepts comma-separated flags like ContributeGI, OccluderStatic, and BatchingStatic, plus Everything or Nothing aliases. Note that Everything covers only the five non-deprecated flags, so NavigationStatic must be named explicitly.

Does this skill detect duplicate materials in Unity?

Yes, optimize_find_duplicate_materials scans the project for materials sharing identical shaders and properties, returning grouped duplicates. This helps consolidate materials and reduce draw call overhead.

Why do optimization write operations need user approval?

Write-type skills like optimize_textures and optimize_set_static_flags run in FullAuto mode and modify importer or component settings, triggering asset reimports. They require a user grant first, and batch changes have no dry-run rollback, so filters must be checked carefully.