Unity Tip: After seeing someone's helpful Unity Tip on Twitter about editing the default C# scripts template, I did some research and tried to make script templates for ECS scripts. I made a video demonstrating how to add extra C# script templates to the editor. The video is posted on Twitter, so here's the link: twitter.com/abhinav_Demkeys/status/110567715191386… You can either make duplicates of '81-C# Script-NewBehaviourScript.cs.txt', rename them and edit them to include the code you want as shown in the video, or download the files from the following gist links: File1: gist.github.com/Demkeys/b4cc09c58f179e605d779dd630…File2: gist.github.com/Demkeys/dea9eccf771c1fb33f712a78ec… ScriptTemplates folder can be found in this location: "[Unity Editor path]\Data\Resources\ScriptTemplates" The template file naming format as shown in the video: "{SortingIndex}-{SubMenuItem}__{MenuItem}-{DefaultFileName}.txt"
{SubMenuItem}__ can be omitted if you don't want the menu item to be within a sub menu. In that case the menu item will show up in the Create sub menu, instead of the ECS sub menu within the Create sub menu.
Ofcourse, you don't have to use the code I've made. If you have a template in mind that better suits your needs, go ahead and create it. If you're editing the original file ('81-C# Script-NewBehaviourScript.cs.txt'), make a backup of the file before editing the original.
Abhinav a.k.a Demkeys (Demkeys)
Unity Tip:
After seeing someone's helpful Unity Tip on Twitter about editing the default C# scripts template, I did some research and tried to make script templates for ECS scripts. I made a video demonstrating how to add extra C# script templates to the editor. The video is posted on Twitter, so here's the link: twitter.com/abhinav_Demkeys/status/110567715191386…
You can either make duplicates of '81-C# Script-NewBehaviourScript.cs.txt', rename them and edit them to include the code you want as shown in the video, or download the files from the following gist links:
File1: gist.github.com/Demkeys/b4cc09c58f179e605d779dd630…File2: gist.github.com/Demkeys/dea9eccf771c1fb33f712a78ec…
ScriptTemplates folder can be found in this location:
"[Unity Editor path]\Data\Resources\ScriptTemplates"
The template file naming format as shown in the video:
"{SortingIndex}-{SubMenuItem}__{MenuItem}-{DefaultFileName}.txt"
{SubMenuItem}__ can be omitted if you don't want the menu item to be within a sub menu. In that case the menu item will show up in the Create sub menu, instead of the ECS sub menu within the Create sub menu.
Ofcourse, you don't have to use the code I've made. If you have a template in mind that better suits your needs, go ahead and create it. If you're editing the original file ('81-C# Script-NewBehaviourScript.cs.txt'), make a backup of the file before editing the original.
6 years ago | [YT] | 3