原始对象和占位对象
使用 Asset Store

资源包

Unity Standard Assets and items on the Unity Asset Store are supplied in Asset packages. Asset 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, an Asset package maintains its original directory structure when it is unpacked, as well as metadata about Assets (such as import settings and links to other Assets).

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

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

导入资源包

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

选择 Assets > Import Package 可导入这两种类型的资源包。

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

导入标准资源

Unity ‘Standard Assets’ consist of several different Asset packages: 2D, Cameras, Characters, CrossPlatformInput, Effects, Environment, ParticleSystems, Prototyping, Utility, Vehicles.

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

1.打开要向其中导入资源的项目。

2.选择 Assets > Import Package__,然后从列表中选择要导入的资源包的名称。 此时将显示 Import Unity Package__ 对话框,并且预先选中了资源包中的所有项, 可以直接安装。(请参阅图 2:全新安装 Import Unity Package 对话框。)

  1. Select Import and Unity puts the contents of the package into a Standard Asset folder, which you can access from your Project view.
图 2:全新安装 Import Unity Package 对话框
图 2:全新安装 Import Unity Package 对话框

导入自定义资源包

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

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

1.打开要向其中导入资源的项目。

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

  2. Select the package you want from Explorer or Finder, and the Import Unity Package dialog box displays, with all the items in the package pre-checked, ready to install. (See Fig 3: New install Import Unity Package dialog box.)

  3. Select Import and Unity puts the contents of the package into the Assets folder, which you can access from your Project view.

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

升级标准资源

在升级 Editor 时不会自动升级标准资源。

When you create a new Project in Unity, you can choose to include the Standard Assets collections in your Project. Unity copies the Assets you choose to include from the Unity install folder into your new Project folder. This means that if you upgrade your Unity Editor to a newer version, the Standard Assets you have already imported into your Project do not upgrade: you have to manually upgrade them.

HINT: A newer version of a Standard Asset might behave differently in your existing installation (for performance or quality reasons, for example). A newer version might make your Project look or behave differently and you may need to re-tweak its parameters. Check the package contents and Unity’s release notes before you decide to re-install.

Exporting Asset packages

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

1.打开要从中导出资源的项目。

2.从菜单中选择 Assets > Export Package… 以弹出 Exporting Package 对话框。 (请参阅图 4:Exporting Package 对话框。)

3.在此对话框中,通过单击复选框来选择要包含在资源包中的资源。

4.将 include dependencies 复选框保持选中状态,即可自动选择所选资源使用的所有资源。

  1. Click on Export to bring up the File Explorer (Windows) or Finder (Mac) and choose where you want to store your package file.

6.为资源包命名,并将其保存任何所需位置。

HINT: When exporting a package Unity can export all dependencies as well. So, for example, if you select a Scene and export a package with all dependencies, then Unity exports all Models, Textures and other Assets that appear in the Scene as well. This can be a quick way of exporting several Assets without manually locating them all.

图 4:Exporting Package 对话框
图 4:Exporting Package 对话框

Updating Asset packages

Sometimes you may want to change the contents of a package and create a newer, updated version of your Asset package. To do this:

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

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

NOTE: You can re-name an updated package and Unity recognizes it as an update, so you can use incremental naming: for example, MyAssetPackageVer1, MyAssetPackageVer2.

HINT: Avoid removing files from Asset packages and then replacing them with the same name: Unity recognizes them as different and possibly conflicting files and then displays a warning symbol when they are imported. If you have removed a file and then decide to replace it, it is better to give it a different but related name to the original.

重新安装标准资源, 升级标准资源, 升级 Standard Assets, 安装标准资源, 安装 Standard Assets, 导入标准资源, 导入 Standard Assets


原始对象和占位对象
使用 Asset Store