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
- Editor Tool: Property Watcher
- .unityignore : Hide files from Project window
- PostBuild Script to Create Single exe Standalone File
- Game Loop Designer
- 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)
Recent Comments
Coin:
CUgDSbRqFcAumDSAcdKDvuXsw26VdkJe8C8WGUQHBAGS
An article by












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