shown in other instead.
Package is a collection of files and data for UNIGINE projects stored in a single *.upackage file. A Package compresses data while preserving the original directory structure. Packages can be used to conveniently transfer files between your projects or exchange data with other users, be it content (a single model or a scene with a set of objects driven by logic implemented via C# components) or files (plugins, libraries, execution files, etc.).
Creating a Package#
UnigineEditor allows exporting into a Package file both assets from the Asset Browser and external files (i.e. files stored outside the data_path directory).
In general, the pipeline is similar for both cases, however, there are some differences.
Exporting Assets From Asset Browser#
To export assets from the Asset Browser into a Package file:
In the Menu bar, choose Packages -> Export Package and then click the Add Assets From Asset Browser button in the Export Package window that opens.
Select the assets that you want to add to the Package in the Select Assets window and click OK. You can even select the folder containing the whole project, and then deselect the data you don't require on the next step.
Note that you can do the same in the Asset Browser: right-click the required asset(s) or folder(s) and choose Export As Package option in the context menu.
Now you can select assets to be exported in the Export Package window using a checkbox for each asset.Keep in mind that any single file that you want to include must be less than 2 GB. The Package size is not limited.
You can automatically add all dependent assets to the package (a texture used by a material, materials assigned to an object, etc.) via the Include Dependencies checkbox (dependent assets are marked green in the list).
After selecting assets click Export Package to pack them into a new *.upackage file.At least one asset must be selected to activate the Export Package button.
- In the dialog window that opens, define the name and path to your package and click Save.
As soon as your Asset Package is successfully created, the location of your *.upackage file will be shown in your file manager.
Exporting External Files#
To copy external files (i.e. project files stored outside the data_path directory) to a Package file:
- Open the Export Package window: in the Menu bar, choose Packages -> Export Package. If you have already added assets from the Asset Browser, you may skip this step as the window is open.
Сlick the Add External Files button, choose files or folders in the dialog window that opens and click Open. Note that the external folders are colored red, while the folders from the Asset Browser are blue.You can't add files stored outside the project folder.
- Select files and/or folders to be exported, click Export Package, specify the name and path to a new *.upackage file and click Save.
Importing a Package#
To import contents of an existing package to your project you need to:
Drag it from the File Explorer directly into the Asset Browser or choose Packages -> Import Package in the Menu bar and select the *.upackage file. You can also right-click in the Asset Browser, choose Import New Asset in the context menu and select the package.
If you have already added the *.upackage file to your targed project, double-click on it.Do not use a file manager of your OS to copy a package to your project's folder, as in this case the package will be displayed in the Asset Browser, but its contents won't be extracted.
The following window will open:
Check the assets that are going to be imported. Assets in the package can be colored white, red, and yellow:
To import all dependent assets for the ones that are selected, check Force Import Dependencies. Such assets will be colored green. For example, if you uncheck a texture used by a selected material, the texture will be imported anyway.
- White-colored assets can be imported without any changes.
- Yellow-colored assets are imported with a postfix to resolve the name collision.
Red-colored assets cannot be imported due to one of the following reasons:
- The same asset is found in the project.
- Asset with the same Source Runtime GUID is found in the project.
- Asset with the same Runtime GUID is found in the project.
- The specified target mount point is read-only.
- After selecting all assets required for import, click the Import Package button.
- Wait for the extraction process. Extraction time depends on the size of the assets selected for the import.
Except assets, you can also import files stored in a package. If such file already exists in the project, it will be colored red with no import option.
Upon successful package import, a new folder with the corresponding contents will be available in the Asset Browser and the following message will be displayed:
Managing a Package#
Packages provided on Add-On Store may be updated by the package creator from time to time. In this case, you'll need to delete the previously added files and add the new package version. The Add-On Store Package History window shows all added packages downloaded from Add-On Store and helps deleting the package files in one click.
To open the Add-On Store Package History window, select Packages -> Add-On Store Package History in the menu.
The following window will open:
This window provides the following details and options:
|Imported Packages||The list of packages from Add-On Store that have been imported to this project.|
The hierarchy of files available in the selected package. If some package files have not been imported, they still be displayed in the File Hierarchy list but in grey color, as they are unavailable.
The following options are available on this tab:
Displays the description of the package as provided by the package creator on Add-On Store including the package version.