Quick Start
This guide will describe how to install an OccaSoftware product in Unity.
Unity supports two types of resources:
Assets are typically images, models, or audio files; Packages are typically code plug-ins.
OccaSoftware publishes both Assets and Packages. Unity projects are split in two folders: Assets and Packages. You must import Assets and Packages to the corresponding folder in your Unity project.
- Import Assets to your Assets folder.
- Import Packages to your Packages folder.
Import an Asset
This section details how to download and import an Asset from OccaSoftware.
- Identify the Asset you want in the Dashboard.
- Click the Download button.
- Extract the zip file.
- Import the contents to your Assets folder.
Import a Package
This section details how to download and import a Package using the zip file workflow.
- Identify the Package you want in the Dashboard.
- Click the Download button.
- Extract the zip file.
- Import the contents to your Packages folder.
Import a Package using the Package Manager (Advanced)
This section details how to download and import a Package using the Unity Package Manager.
You will use the Unity Package Manager (opens in a new tab) to load OccaSoftware packages from our Git repositories. (We host our Git repositories on Github (opens in a new tab).)
In this example, you will install Ninja. Ninja is a lightweight performance profiling widget. As an overview, you will need to take the following steps:
- Install Git and Git LFS.
- Install the Package.
1. Install Git and Git LFS
- Install the Git client (opens in a new tab) (minimum version 2.14.0).
- Install the Git LFS (opens in a new tab) client.
2. Install the Package
- In the Window menu, select Package Manager.
- In the toolbar, click +.
- In the dropdown menu, select Add package from git URL.
- Enter the Git URL. In this case, type
https://github.com/OccaSoftware/ninja.git
. - Click Add.
Unity will import the Package and execute a Domain Reload. Once Unity finishes, you will see the new Package, Ninja, in your Packages folder.
Unity may encounter an issue when importing the Package. If a problem occurs, try to Troubleshoot your issue.
Additional Package Features
Packages offer additional features beyond Assets. For example, you can specify Package versions in your Project Manifest (opens in a new tab).
Understand the Project Manifest
Unity uses the Project Manifest to list and load Project Dependencies. A Package is a Project Dependency. If you add a Package to the Project Manifest, Unity will import that Package to your Project for you.
The Project Manifest stores the list of Project Dependencies as key-value pairs in a json file.
{
"dependencies": {
"{PACKAGE_NAME}": "{PACKAGE_URL}",
"{PACKAGE_NAME}": "{PACKAGE_URL}"
}
}
Use the Project Manifest
To add a Package to the Project Manifest, you need to do the following steps:
- Navigate to your Packages folder in your file browser.
- Open the manifest json file.
- Add the Package name and URL as a key-value pair in the manifest dependencies.
For example, you want to add Ninja to your Project Manifest. The Package Name and URL for Ninja are as follows:
- Package Name:
com.occasoftware.ninja
- Package URL:
https://github.com/OccaSoftware/ninja.git
To add Ninja, you update your Project Manifest with the key-value pair in the dependencies list.
"com.occasoftware.ninja": "https://github.com/OccaSoftware/ninja.git"
Specify a package version
To declare a specific package version that you want the Package Manager to clone, add the revision prefixed by the number sign (#) at the end of the URL:
"com.occasoftware.ninja": "https://github.com/OccaSoftware/ninja.git#1.1.0"
Troubleshoot
If Unity wasn’t able to install the package, the Unity Console will display an error message.
- No ‘git’ executable was found
- git-lfs: command not found
- Repository not found
- Could not read Username: terminal prompts disabled
For directions on how to resolve Package import issues, review Unity's documentation on UPM Errors (opens in a new tab).