Introduction
Whatever version of Unity you’re using, remember to always import the asset in an empty project, so that the engine’s project settings get properly imported. If you decide not to import in a blank project, at least make sure to remove the old Corgi Engine folder first to avoid conflicts.
How to import the Corgi Engine in your project?
- Create a new project from Unity Hub, pick the latest stable version of Unity as your Unity version, and 2D or 3D as the Template
- Go to Window > Package Manager, then from the top left dropdown pick “My Assets”, find Corgi Engine in the list and import it the project (it has to be in an empty project, not an existing one)
- You will be warned that importing the Corgi Engine will overwrite your current project settings (that’s normal), click on Import.
- This will take a bit of time.
- Once this is complete, you’ll get a prompt saying “This Unity Package has Package Manager dependencies”. This is also normal, click on “Install/Upgrade”.
- After that you’ll get a list of the contents of the engine, don’t touch anything, and click on Import in the bottom right corner.
- Import will also take a while. Once import is complete, you’re ready to use the engine. Have fun!
How to import the Corgi Engine in a URP project?
The engine doesn’t do any rendering, it’ll work with any render pipeline.
The demos are made using the Standard Render Pipeline, as it’s still the only stable one, and the most common denominator, but you can use any RP you prefer. If you decide to use URP or HDRP in your project, the best approach would be to keep another project at hand, using SRP, to test the engine’s demos in, while you implement your own game in URP/HDRP.
Below are steps to install the Corgi Engine on a URP project. It’s recommended to have at least basic knowledge of render pipelines before picking URP or HDRP, considering the many quirks of these two render pipelines.
- Create a new project in Unity 2019.4.28f1 (or higher), using the URP template
- Import the Corgi Engine from the Package Manager
- Via the package manager, update other packages if you have to (Pixel Perfect typically can cause issues with URP on some of its versions)
- Open the MinimalLevel demo scene (or any scene)
- Open your project settings (Edit > Project Settings), in Graphics, at the top of it, set a Scriptable render pipeline asset (the URP default template usually comes with a few, pick the HighQuality one)
- In the scene, select the UICamera, on its Camera component, set RenderType to Overlay
- Select the MainCamera (called Regular Camera in some scenes), at the bottom of its Camera component, add the UICamera to its Stack
- If you want to convert all (or most) materials to URP, simply go to Edit > Render Pipeline > Universal Render Pipeline > Upgrade Project Materials to URP Materials, press play, the demo will play. Note that you’d also have to port post processing effects, as Unity went with a different system (volumes) on URP/HDRP.
Some of my materials are all pink!
While most of the materials used in the engine’s demos will display fine on all RPs, a few demos, like the NewCorgi3D one, use custom shaders, and these will break in HDRP or URP. Thankfully, you can convert them fairly easily, like so :
- select all materials that are using a BiRP shader (typically, the materials under Demos/Corgi3D/Materials)
- in their inspector, at the top, set their shader to Standard
- then, go Edit > Rendering > Materials > Convert Selected Built-In Materials to URP They won’t look just as good as they would have in BiRP, but will let you enjoy the demo just fine.
Older versions of the engine (before Unity 2019.2 only)
On install you’ll likely get a number of errors, that’s absolutely normal. All you need to do to fix them is, from your file explorer (not from Unity) copy the manifest.json file, located at the root of the Corgi Engine folder, and paste it into your project’s Packages folder, replacing the one that is already there. You may have to restart Unity and/or reimport your packages folder, but most of the time it just works out of the box.
While replacing the manifest is the easiest and fastest way to go about getting the asset to work, this may cause some issues if you want finer control over what packages your project uses, such as LWRP or HDRP. In that case, it’s recommended to install all the asset’s dependencies manually. There are only 3 packages needed for the asset to work : Cinemachine, 2D Pixel Perfect, and the PostProcessing stack.
If you prefer manually installing packages, don’t override the manifest.json, but instead open it. It contains the exact version numbers you need to install for these 3 dependencies. Then go to Window > Package Manager, and install the exact same versions of Cinemachine, 2D Pixel Perfect and PostProcessing as specified in the manifest. Some of these may not be compatible with a brand new release of Unity, in which case you should probably either pick a more recent version of the package, or safely wait until the next Corgi Engine update.
A bit of info about why this may happen : Unity allows (for now) an asset on the Asset Store to upload its Project Settings folder (which includes input, quality, etc), but not the Packages’ manifest.json, which describes what packages the asset uses (such as, in this case, PostProcessing and Cinemachine). Hopefully that will change in the near future. In the meantime, please try the steps above if you run into issues.
Tilemaps and 2D Extras
The engine uses tilemaps in some of its demos (the Retro ones, mostly). If you wish to use or edit these tilemaps, you will need to add Unity’s 2D extras to your project, as most of the tiles in these demos’ tile palettes rely on them. To add the 2D extras to your project, simply download the latest release’s source as a zip, and extract its contents into your project in the folder of your choice. These used to be included in the asset, but Unity now has separate versions for different editor versions, and it’s still not available via the package manager, so this manual installation is unavoidable.
Unity versions not yet supported by the engine
Updates for the Corgi Engine usually support the latest stable version of Unity, but sometimes they lag behind a bit. If you’re importing the asset in a freshly released Unity version, chances are some packages won’t be compatible and you’ll have to manually sort dependencies using the method described above.