A CLI tool to easily create custom unity project templates.
cargo build --release
The default config file looks like this:
[essentials]
# path to the unity hub editor folder
unity_hub_path="C:\\Program Files\\Unity\\Hub\\Editor"
# all default dependencies to select
default_dependencies=[
"com.unity.collab-proxy",
"com.unity.feature.development",
"com.unity.textmeshpro",
"com.unity.timeline",
"com.unity.visualscripting",
"com.unity.ugui",
]
The name will be autoformatted for you to comply with the template naming requirements
create-unity-template.exe new template-name
The creation process will go through multiple steps:
- Display name
- The shown name in the Unity Hub
- Description
- The text to show in the Unity Hub when selected
- Keywords
- Used for filtering
- Needs to be in comma-separated format
- Not entire sure if this is used outside of packages
- Default Scene
- Loads up on first boot
- Has to be a full editor path, such as: "Assets/Scenes/SampleScene.unity"
- Repository
- A link to a repository location. Is purely for viewing purposes.
- Unity version
- The Unity version the creator will operate upon
- Will be shown in a selection list
- Package version
- The version of this package template
- Project path
- The path to the project this template will use to clone
- Point to the root folder
- Dependencies
- The build-in dependencies that will be included in the manifest
- Will be shown in a selection list
- The default dependencies from the config will be auto-selected
The built template will be in the /builds/
folder. There it can be modified to include whatever you need, such as additional specific dependencies.
create-unity-template.exe pack
The template will be packed with a single-ran script when the project is loaded. This will automatically replace the generated manifest file with the one you created with the tool.
After packing, the .tgz
file will be located in the /outputs/
folder. This file will need to be copied into the package folder associated with the version you built for (will be shown in the terminal after packing). After that, restart the Unity Hub to have it refresh its template cache.