7
2016
Adding Custom Script Templates

Adding custom script templates is quite simple:
– Create your custom script
– Replace all class name strings with #SCRIPTNAME# (this will get replaced by the new created script name)
– Move the script file under your unity installation folder: \Unity\Editor\Data\Resources\ScriptTemplates\
– Rename “YourScript.cs” into “81a-C# Your Script-YourNewScript.cs.txt” (’81a’ is the menu location, so this would appear below the default c# script)
Note:
– This folder gets replaced if you install new Unity version!
– You need to restart unity after you have placed the file on that folder (otherwise its not visible in the menu)
– You can remove the “82-Javascript-NewBehaviourScript.js.txt” if you don’t need javascript files, saves some space on the menu..
Example editor script template:
https://github.com/UnityCommunity/UnityLibrary/blob/master/ScriptTemplates/81a-C%23%20Editor%20Script-NewEditorScript.cs.txt
References:
https://support.unity3d.com/hc/en-us/articles/210223733-How-to-customize-Unity-script-templates
Related Posts
1 Comment + Add Comment
Leave a comment
Recent posts
- Favorites in PackageManager
- LudumDare59 : Signal
- Unity Editor: Tree Generator
- Leaf/Foliage Generator Tools (Runs in Browser)
- Testing Unity AI Beta
- Ways to Support UnityCoder Development
- Using UI Slider to Create 5-Star Rating Element
- Game Music Library For Unity (editor plugin)
- Fontastic : Easily Test Fonts in Unity Editor!
- GeoTiff Importer & Terrain Generator for Unity
- Create Baked DropShadow for UI images
- .JP2 Ortho Image Converter to PNG/JPG/TIFF
Recent Comments
- on Mesh Exploder (sources)
- on Sprite Sheet Flip Book Shader
- on Sprite Sheet Flip Book Shader
- on [Asset Store] PolygonCollider2D Optimizer
- on Trajectory Test Scene 2.0
- on Vector3 maths for dummies!
- on UnityHub 3.6.0: Remove Version Control & Cloud Dashboard columns
- on Using RenderDoc with Unity (graphics debugger)
Coin:
CUgDSbRqFcAumDSAcdKDvuXsw26VdkJe8C8WGUQHBAGS
An article by












Check out my open source project that allows creating custom templates easily: https://bitbucket.org/liortal/code-templates