ScriptTemplates
Automatically synchronizes custom script templates from the project's ScriptTemplates folder into Unity's Editor installation directory, ensuring project-specific "Create > C# Script" templates are always available.
Architecture
Data Flow
Key Concepts
Auto-sync on load: Runs every time the editor loads via
[InitializeOnLoad]static constructorContent-aware: Only copies files when content has actually changed (line-by-line comparison)
.txtfilter: Only processes.txttemplate files (Unity's template format)Source:
Application.dataPath(project Assets folder) — searched recursively for aScriptTemplatessubfolderTarget:
EditorApplication.applicationContentsPath(Unity Editor install) — searched recursively for theScriptTemplatessubfolder
Unity script templates use a naming convention like 81-C# Script-NewBehaviourScript.cs.txt. The number prefix controls menu order and the name between hyphens becomes the menu item text.
Classes
Auto-syncs custom script templates to the Unity Editor installation
See Also
Paragon Editor Overview — root editor module
Last updated