Version: 2017.3
Importing from the Asset Store
Standard Assets

Asset Packages

Unity packages are a handy way of sharing and re-using Unity projects and collections of assets; Unity Standard Assets and items on the Unity Asset Store are supplied in packages, for example.
Packages are collections of files and data from Unity projects, or elements of projects, which are compressed and stored in one file, similar to Zip files. Like Zip files, a package maintains its original directory structure when it is unpacked, as well as meta-data about assets (such as import settings and links to other assets).

In Unity, the menu option Export Package compresses and stores the collection, while Import Package unpacks the collection into your currently open Unity project.

本页面包含以下相关信息:

  • Import Package: - Standard Asset Packages - Custom Packages
  • Export Package
  • Exporting Updated Packages

Import Package

You can import Standard Asset Packages, which are asset collections pre-made and supplied with Unity, and Custom Packages, which are made by people using Unity.

Choose Assets > Import Package > to import both types of package.

Fig 1: Asset>Import Package menu
Fig 1: Asset>Import Package menu

Standard Asset Packages

Unity 标准资源__包括多种不同资源包: 2D、Cameras、Characters、CrossPlatformInput、Effects、Environment、ParticleSystems、Prototyping、Utility、Vehicles__。

要导入新的__标准资源__包,请执行以下操作:

  1. Open the project you want to import assets into.

  2. Choose Assets > Import Package > plus the name of the package you want to import, and the Import Unity Package dialog box displays, with all the items in the package pre-checked, ready to install. (See Fig 2: New install Import Unity Package Dialog Box.)

3.选择 Import__,然后 Unity 会将资源包的内容放入到 Standard Asset__ 文件夹中; 可以从 __Project 视图__中访问此文件夹。

图 2:全新安装 Import Unity Package 对话框
图 2:全新安装 Import Unity Package 对话框

Custom Packages

You can import custom packages which have been exported from your own projects or from projects made by other Unity users.

要导入新的自定义资源包,请执行以下操作:

  1. Open the project you want to import assets into.

  2. Choose Assets > Import Package > Custom Package… to bring up up File Explorer (Windows) or Finder (Mac).

3.从资源管理器或 Finder 中选择所需的资源包,此时将显示 Import Unity Package 对话框, 其中预先选中了资源包中的所有项,可以直接安装。(请参阅图 4:全新安装 Import Unity Package 对话框。)

4.选择 Import__,然后 Unity 会将资源包的内容放入到 Assets__ 文件夹中; 可以从 __Project 视图__中访问此文件夹。

Fig 4: New install Import Unity Package dialog box
Fig 4: New install Import Unity Package dialog box

Export Package

使用 Export Package 可创建您自己的__自定义资源包__。

1.打开要从中导出资源的项目。 2. Choose Assets > Export Package… from the menu to bring up the Exporting Package dialog box. (See Fig 6: Exporting Package dialog box.) 3.在此对话框中,通过单击复选框来选择要包含在资源包中的资源。 4.将 include dependencies 复选框保持选中状态,即可自动选择所选资源使用的所有资源。 5.单击 Export 以打开文件资源管理器 (Windows) 或 Finder (Mac),然后选择要存储资源包文件的位置。 为资源包命名,并将其保存任何所需位置。

提示:导出资源包时,Unity 也可以导出所有依赖项。 因此,例如,如果选择一个场景并导出包含所有依赖项的资源包,那么也将导出场景中出现的所有模型、 纹理和其他资源。 这是导出大量资源的快捷方法,无需手动定位所有资源。

Fig 6: Exporting Package dialog box
Fig 6: Exporting Package dialog box

Exporting Updated Packages

有时可能希望更改资源包的内容并创建资源包的更新版本。 为此需要执行以下操作:

  • 选择希望纳入资源包中的资源文件(选择未更改的文件和新文件)。

  • 如上文的导出资源包中所述,导出文件。

注意:可以重命名更新的资源包,而 Unity 会将其识别为更新,因此可以使用增量式命名方式,例如:MyAssetPackageVer1、MyAssetPackageVer2。

提示:不建议从资源包中删除文件,然后使用相同名称来替换这些文件: Unity 会将这些文件识别为不同且可能发生冲突的文件,因此在导入这些文件时会显示警告符号。 如果已删除文件,随后决定恢复此文件,最好给此文件提供一个与原名不同但相关的名称。

Importing from the Asset Store
Standard Assets
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961