Just add the ScriptTemplates folder to your Assets folder inside your Unity project.
81-ECS Script Templates__C# ECS Authoring-NewAuthoring.cs.txt
Parameter | Description |
---|---|
"81" | Number defining the order in the Create menu. The lower the value the higher the template will appear |
"ECS Script Templates__C# ECS Authoring" | Path definition. Here the template will be in "Create -> ECS Script Templates" category and it will have a name "C# ECS Authoring" |
"NewAuthoring.cs" | Name and the extension of the file that will be created in the Project tab in unity |
".txt" | Tempalte needs to be saved as a Text file |
using Unity.Entities;
using UnityEngine;
public class #SCRIPTNAME# : MonoBehaviour
{
}
public class #SCRIPTNAME#Baker : Baker<#SCRIPTNAME#>
{
public override void Bake(#SCRIPTNAME# authoring)
{
}
}
#SCRIPTNAME# - This will be swapped for the name that you gave to your script. We can add to it prefix or a suffix like I do with "#SCRIPTNAME#Baker"
*To use those specific Script Templates make sure that you have [Entities package](https://docs.unity3d.com/Packages/com.unity.entities@1.0/manual/index.html) installed in yopur project