Version: 2018.3 (switch to 2019.1 )
Primitive and placeholder objects
Using the Asset Store
Other Versions

Asset packages

Unity uses two types of packages:

  • Asset packages, available on the Unity Asset StoreA growing library of free and commercial assets created by Unity and members of the community. Offers a wide variety of assets, from textures, models and animations to whole Project examples, tutorials and Editor extensions. More info
    See in Glossary
    , which allow you to share and re-use Unity Projects and collections of Assets.
  • Unity packages, available through the Package Manager window. You can import a wide range of Assets, including plug-insA set of code created outside of Unity that creates functionality in Unity. There are two kinds of plug-ins you can use in Unity: Managed plug-ins (managed .NET assemblies created with tools like Visual Studio) and Native plug-ins (platform-specific native code libraries). More info
    See in Glossary
    directly into Unity with this type of package.

This section provides information about using Asset packages in Unity.

Asset packages

Unity Standard AssetsA collection of useful assets supplied with Unity. Unity ships with multiple Standard Asset such as 2D, Cameras, Characters, CrossPlatformInput, Effects, Environment, ParticleSystems, Prototyping, Utility, and Vehicles. More info
See in Glossary
and items on the Unity Asset Store are supplied in packages, which 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.

This page contains information on:

Importing Asset packages

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 AssetsAny media or data that can be used in your game or Project. An asset may come from a file created outside of Unity, such as a 3D model, an audio file or an image. You can also create some asset types in Unity, such as an Animator Controller, an Audio Mixer or a Render Texture. More info
See in Glossary
> Import Package to import both types of Asset packages.

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

Importing Standard Assets

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

To import a new Standard Asset package:

  1. Open the Project you want to import Assets into.

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

  3. Select Import and Unity puts the contents of the package into a Standard Asset folder, which you can access from your Project ViewA view that shows the contents of your Assets folder (Project tab) More info
    See in Glossary
    .

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

Importing custom Asset packages

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

To import a new custom package:

  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. 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 4: New install Import Unity Package dialog box.)

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

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

Upgrading Standard Assets

Standard Assets do not upgrade automatically when you upgrade the Editor.

When you create a new Project in Unity, you can choose to include 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 packages

Use Export Package to create your own Custom Package.

  1. Open the Project you want to export Assets from.

  2. Choose Assets > Export Package… from the menu to bring up the Exporting Package dialog box. (See Fig 4: Exporting Package dialog box.)

  3. In the dialog box, select the Assets you want to include in the package by clicking on the boxes so they are checked.

  4. Leave the include dependencies box checked to auto-select any Assets used by the ones you have selected.

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

  6. Name and save the package anywhere you like.

Hint: When exporting a package Unity can export all dependencies as well. So, for example, if you select a SceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary
and export a package with all dependencies, then all models, Textures and other Assets that appear in the scene will be exported as well. This can be a quick way of exporting a bunch of Assets without manually locating them all.

Fig 4: Exporting Package dialog box
Fig 4: Exporting Package dialog box

Updating 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. Select the Asset files you want in your package (select both the unchanged ones and the new ones).

  2. Export the files as described above in Export Package, above.

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

Hint: It is not good practice to remove files from packages and then replace them with the same name: Unity will recognize them as different and possibly conflicting files and so display 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.

Re-install Standard Assets, Upgrade Standard Assets, Upgrading Standard Assets, Install Standard Assets, Installing Standard Assets, Import Standard Assets, Importing Standard Assets


对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答