Unity Package Manager
Teak is available via UPM through a GitHub repo.
The repo uses a specific branch structure so that you can manage the Teak dependency via git in the same way you would use other package management, to get minor and patch version updates.
|
If you see an error: {
"dependencies": {
"io.teak.unity.sdk": "https://github.com/GoCarrot/upm-package-teak.git"
}
}
|
The Latest Version
The latest version is always available at https://github.com/GoCarrot/upm-package-teak.git
How UPM Versions Work
The Teak SDK uses semantic versioning, which consists of:
<major>.<minor>.<patch>
- For example
-
4.3.0
Major, breaking changes will happen only in major versions.
If new features are added, but no major breaking change has happened, it will be in a minor version.
If only bugs are fixed, or other changes occur in a non-breaking way, it will be a patch version.
For example: if you are using version 4.2.0 then you can update to version 4.2.1 and you should see no issues (except the bugs that got fixed, or performance improvements).
The version control structure for the Teak SDK, distributed via UPM, matches this and allows you to use the version that makes the most sense for you.
{
"dependencies": {
"io.teak.unity.sdk": "https://github.com/GoCarrot/upm-package-teak.git#4.3.0"
}
}
You will always use version 4.3.0, even when new versions come out
{
"dependencies": {
"io.teak.unity.sdk": "https://github.com/GoCarrot/upm-package-teak.git#4.3"
}
}
You will use any version of 4.3.x, so if 4.3.1 comes out, your dependency can be updated.
{
"dependencies": {
"io.teak.unity.sdk": "https://github.com/GoCarrot/upm-package-teak.git#4"
}
}
Then any version of the 4.x.x series that releases will be eligible.
{
"dependencies": {
"io.teak.unity.sdk": "https://github.com/GoCarrot/upm-package-teak.git"
}
}
Then any version of the SDK that releases will be eligible, including major version updates.
Assembly Definitions
If your project keeps its scripts in their own Assembly Definition (.asmdef) files, you may hit a compile error like:
error CS0246: The type or namespace name 'Teak' could not be found (are you missing a using directive or an assembly reference?)
Teak ships as its own assembly named Teak. Unity’s predefined assemblies (Assembly-CSharp) reference it automatically, but your own assembly definitions do not — and a shipped package can’t add that reference for you. Reference the Teak assembly from any of your assembly definitions that call into the Teak SDK.
Add the reference in the Inspector
-
Select your assembly definition asset (
.asmdef) so its properties show in the Inspector. -
Under Assembly Definition References, click + and assign the
Teakassembly. -
Click Apply.
See Unity’s Referencing assemblies for details.