The Universal Project Template configures Project settings for Projects where performance and wide platform support are the primary considerations.
This Project Template uses the following features:
- Universal Render Pipeline (URP) - A prebuilt Scriptable Render Pipeline that is quick and easy to customize, and lets you create optimized graphics across a wide range of platforms. URP also includes an optimized 2D renderer complete with 2D lights and pixel perfect rendering, and an integrated post-processing solution. For more information, see the URP documentation.
- Shader Graph - This tool allows you to create shaders using a visual node editor instead of writing code. For more information on Shader Graph, see the Shader Graph documentation.
CI has been added to the project and it will test your template on every commit on Yamato
.
This will validate that the template package as well as embedded packages (if any) have the right structure, have tests and do not create console logs when opened with Unity.
The CI will also automatically test the template as it would be used by a user on multiple editor versions and OS.
You might need to tweak the list of editors and OS you want to test the template on. For more information, please go here
Note
: To make use of the CI, your repository must be added to Yamato.
Log in to Yamato and click on the Project + button on the top right. This will open a dialog asking for you to specify a git url and project name.
If you want to test your template locally from a user's perspective, you will need to make it available to a Unity Editor. This can be accomplished by following these steps:
-
Use upm-ci tools to test your template
You need to make sure you have
Node.js
andnpm
(install it from here) installed on your machine to package successfully, as the script callsnpm
under the hood for packaging and publishing. The script is tested withnode@v10.16.0
andnpm@5.6.0
. Install globally the upm-ci package:npm install upm-ci-utils -g --registry https://api.bintray.com/npm/unity/unity-npm
-
To run all your template tests
-
Open a console (or terminal) window and cd your way inside your template project folder
upm-ci template test -u 2018.3
You can test against many versions of Unity with the -u parameter:
- Testing on a specific version: use
-u 2019.1.0a13
- Testing on a latest release of a version: use
-u 2019.1
- Testing on the latest available trunk build: use
-u trunk
- Testing on a specific branch: use
-u team-name/my-branch
- Testing on a specific revision: use
-u 3de2277bb0e6
- Testing with an editor installed on your machine: use
-u /absolute/path/to/the/folder/containing/Unity.app/or/Unity.exe
By default, this will download the desired version of the editor in a .Editor folder created in the current working directory.
- Testing on a specific version: use
-
-
To test what a user would see
-
Open a console (or terminal) window and cd your way inside your template project folder
upm-ci template pack
This will generate a folder /upm-ci~/templates/ containing a .tgz file of your converted template. -
Include the tarballed template package in Unity editor
You can then copy the template's
tgz
package file in Unity in one of these paths to make it available in the editor when creating new projects:-
Mac:
<Unity Editor Root>/Contents/Resources/PackageManager/ProjectTemplates
-
Windows:
<Unity Editor Root>/Data/Resources/PackageManager/ProjectTemplates
-
-
Preview your project template
Open Unity Hub. Locate the editor to which you added your template to. When creating a new project, you should see your template in the templates list:
Note: f you are launching the Unity editor without the hub, you will not see additional templates in the list.
-
-
The first step to get your package published to production for public consumption is to send it to the candidates repository, where it can be evaluated by QA and Release Management. You can publish your template to the candidates repository through the added CI, which is the recommended approach.
-
Once you are ready to publish a new version, say version
1.0.0
, you can add a git tagrc-1.0.0
to the commit you want to publish. The CI will validate and then publish your template tocandidates
. -
Request that your template package be published to production by filling out the following form
-
Once your template is published to production, the last step is to create the Ono PR to include your template with a Unity Release, and have it be discovered in the Hub. To do so, create a branch that includes your template in
External/PackageManager/Editor/editor_installer.json
Note
: You can retrieve a version of your template package as an artifact from CI pipelines following any commit made to your repository. This will allow you to easily test a change at any point during your development.