├── .github └── FUNDING.yml ├── .gitignore ├── CHANGELOG.md ├── CHANGELOG.md.meta ├── Editor.meta ├── Editor ├── Author.PackageName.Editor.asmdef └── Author.PackageName.Editor.asmdef.meta ├── LICENSE ├── LICENSE.meta ├── README.md ├── README.md.meta ├── Runtime.meta ├── Runtime ├── Author.PackageName.Runtime.asmdef └── Author.PackageName.Runtime.asmdef.meta ├── Tests.meta ├── Tests ├── Editor.meta └── Editor │ ├── Author.PackageName.Editor.Tests.asmdef │ └── Author.PackageName.Editor.Tests.asmdef.meta ├── package.json └── package.json.meta /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.vscode/ 2 | 3 | # Visual Studio cache directory 4 | .vs/ 5 | 6 | # Autogenerated VS/MD/Consulo solution and project files 7 | ExportedObj/ 8 | .consulo/ 9 | *.csproj 10 | *.unityproj 11 | *.sln 12 | *.suo 13 | *.tmp 14 | *.user 15 | *.userprefs 16 | *.pidb 17 | *.booproj 18 | *.svd 19 | *.pdb 20 | *.mdb 21 | *.opendb 22 | *.VC.db -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | All notable changes to this package are documented in this file. 3 | 4 | The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) 5 | and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). 6 | 7 | ## [major.minor.patch] - yyyy-mm-dd 8 | ### Added 9 | - Lorel Ipsum 10 | 11 | ### Changed 12 | - Lorel Ipsum 13 | 14 | ### Fixed 15 | - Lorel Ipsum -------------------------------------------------------------------------------- /CHANGELOG.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 79a1701d9970e4645b016ab2b257cd19 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e84552be309687144a83f2502a9eaf7d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/Author.PackageName.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Author.PackageName.Editor", 3 | "references": [ 4 | "GUID:9e705d6a72d9a354b810376671ddb3ac" 5 | ], 6 | "includePlatforms": [ 7 | "Editor" 8 | ], 9 | "excludePlatforms": [], 10 | "allowUnsafeCode": false, 11 | "overrideReferences": true, 12 | "precompiledReferences": [], 13 | "autoReferenced": false, 14 | "defineConstraints": [], 15 | "versionDefines": [], 16 | "noEngineReferences": false 17 | } -------------------------------------------------------------------------------- /Editor/Author.PackageName.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 447a42f34d7589946b8de01d4e806a77 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 MyName 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSE.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b1ef955611321d4c964399689ef1ef7 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # kPackageTemplate 2 | ### Package distribution template for Unity. 3 | 4 | kPackageTemplate is a template for defining a Github repository as a package for Unity's Package Manager. Follow instructions below for defining your package from this template. 5 | 6 | ## Defining a Package from this template 7 | - Create a Github repository from this template. 8 | - Open `package.json` and set all fields 9 | - **version** is for versioning this package. See [Semantic Versioning](http://semver.org/spec/v2.0.0.html) for more information. 10 | - **unity** defines the minimum Editor version required. For example, any 2019.3 Editor build would be just `2019.3`. 11 | - You can define dependencies in **dependencies**. However, any dependencies to custom packages from Git will not automatically download (as Unity official packages will). They will also have to be added to the project manifest by the user. In this case a **references** entry only blocks this package from resolving unless the referenced package is present. 12 | - Update assembly definitions 13 | - This template includes the three most common assembly definitions (**Runtime**, **Editor** and **EditorTests**). Assembly definitions are required for package compilation but the supplied definitions are just the most common. You can redefine them if you like. 14 | - These `asmdef` files need to be renamed, both the asset filename as well as the **name** field on the asset (these should match, and be relevent to the package name). 15 | - Ensure the assembly references are correct; both **Editor** and **EditorTests** assemblies should reference **Runtime** assembly. **EditorTests** also references the **TestRunner** as well as **NUnit**. 16 | - Update `CHANGELOG.md`. See [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) for more information. 17 | - Update this `README.md` to reflect the contents of your package. 18 | - Update `LICENSE`. Supplied license is MIT, this is only a suggestion. 19 | 20 | ## Adding the Package to a Project 21 | - Open your project manifest file (`MyProject/Packages/manifest.json`). 22 | - Add `"com.author.packagename": "https://github.com/MyGithubUserName/MyRepository.git"` to the `dependencies` list (replacing package name and repository information). 23 | - Open or focus on Unity Editor to resolve packages. -------------------------------------------------------------------------------- /README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 348769316597fe54b9db2cd435d11a02 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 683872b7a9e58404d86a72f64355a908 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Author.PackageName.Runtime.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Author.PackageName.Runtime", 3 | "references": [], 4 | "includePlatforms": [ 5 | "Android", 6 | "Editor", 7 | "iOS", 8 | "LinuxStandalone64", 9 | "Lumin", 10 | "macOSStandalone", 11 | "PS4", 12 | "Stadia", 13 | "Switch", 14 | "tvOS", 15 | "WSA", 16 | "WebGL", 17 | "WindowsStandalone32", 18 | "WindowsStandalone64", 19 | "XboxOne" 20 | ], 21 | "excludePlatforms": [], 22 | "allowUnsafeCode": false, 23 | "overrideReferences": false, 24 | "precompiledReferences": [], 25 | "autoReferenced": true, 26 | "defineConstraints": [], 27 | "versionDefines": [], 28 | "noEngineReferences": false 29 | } -------------------------------------------------------------------------------- /Runtime/Author.PackageName.Runtime.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9e705d6a72d9a354b810376671ddb3ac 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Tests.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b06745750b9594648ae6e8a52b3dcf9e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Tests/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b831c344cdf9f14ab95279309d511a5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Tests/Editor/Author.PackageName.Editor.Tests.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Author.PackageName.Editor.Tests", 3 | "references": [ 4 | "GUID:27619889b8ba8c24980f49ee34dbb44a", 5 | "GUID:0acc523941302664db1f4e527237feb3", 6 | "GUID:9e705d6a72d9a354b810376671ddb3ac" 7 | ], 8 | "includePlatforms": [ 9 | "Editor" 10 | ], 11 | "excludePlatforms": [], 12 | "allowUnsafeCode": false, 13 | "overrideReferences": true, 14 | "precompiledReferences": [ 15 | "nunit.framework.dll" 16 | ], 17 | "autoReferenced": false, 18 | "defineConstraints": [ 19 | "UNITY_INCLUDE_TESTS" 20 | ], 21 | "versionDefines": [], 22 | "noEngineReferences": false 23 | } -------------------------------------------------------------------------------- /Tests/Editor/Author.PackageName.Editor.Tests.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4d7bdb677fe99a24bb5c724d97ffd1c3 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.author.packagename", 3 | "description": "A short description of the package.", 4 | "version": "major.minor.patch", 5 | "unity": "yyyy.minor", 6 | "displayName": "Display Name", 7 | "dependencies": { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 86eeb02d66d12f945ac8f9ca24c90772 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | --------------------------------------------------------------------------------