Time for action – Exporting asset packages

There will be times when you want to share a collection of assets with other users on your team or within the community. Unity makes this easier by providing a simple mechanism called Packages. A package is just a collection of assets bundled together in a single file.

In this exercise we're going to explore how one would share assets from an existing project with other developers:

  1. Open the project for this chapter named HelloWorld2. In it you will find a version of our original Hello World demo with some additional assets.
  2. Select the assets that you want to export as part of the package:
    Time for action – Exporting asset packages

    In the above illustration the Materials element within the Project has been selected. There are Puppy and Grass materials that are a child of the Materials element and they will be bundled in the package as well. If you only wanted to share the Puppy materials you would simply select the Puppy element and only those materials would be packaged.

  3. Next let's create a package using the Export Package menu (Assets | Export Package). When selected, this will create a package starting with the selected item in the Project view and anything that is a child of this element.
  4. Unity will then display a dialog with all of the assets that will be exported. If there are assets that you want to remove, uncheck its checkbox:
    Time for action – Exporting asset packages

    In addition, there is a checkbox labeled Include dependencies. If your assets have other assets, such as scripts, that they depend on, keeping this box checked tells Unity to include those assets in the package.

  5. Select the Export button and, in the subsequent file dialog, provide a name for the Unity package file. Unity will create and compress the assets into a file with the extension .unitypackage:
    Time for action – Exporting asset packages

What just happened?

We have created a Unity package that contains all of the assets we selected. This is the ideal way to share assets with your team as any settings, hierarchies, and so on will be preserved when those assets are imported.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.94.187