1. 包的类型
(1)嵌入式包(包文件夹在项目文件夹下,在其下的 Packages 子文件夹中)
(2)本地包 (包文件夹在项目文件夹外,路径不固定)
2. 创建 “本地包” 的步骤
官方文档: 创建自定义包
文件示例1:package.json 文件,如下图所示:
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
{ "name": "com.example.digitaltwin", "version": "0.1.0", "displayName": "Digital Twin", "description": "This is an digital twin utility package", "unity": "2019.1", "unityRelease": "0b5", "documentationUrl": "https://example.com/", "changelogUrl": "https://example.com/changelog.html", "licensesUrl": "https://example.com/licensing.html", "dependencies": {}, "keywords": [ "keyword1", "keyword2", "keyword3" ], "author": { "name": "HDQY", "email": "unity@example.com", "url": "https://www.unity3d.com" } }
文件示例2: xxx.asmdef 文件,如下图所示:
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
{ "name": "DigitalTwin", "references": [], "includePlatforms": [], "excludePlatforms": [], "allowUnsafeCode": false, "overrideReferences": false, "precompiledReferences": [], "autoReferenced": true, "defineConstraints": [], "versionDefines": [], "noEngineReferences": false }
示例包下载:百度网盘