This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
创建内容
内容优化
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

复制其他项目的资产

Assets used in one UNIGINE project, both simple and composite (e.g. a material requiring a texture, or a node that requires several materials linked to plenty of textures), can be easily copied to another project using Asset Packages.一个UNIGINE项目中使用的资产,无论是简单的还是复合的(例如,需要纹理的材料,或者需要与大量纹理相关联的多种材料的节点),都可以使用Asset Packages轻松地复制到另一个项目中。

Asset Package is a collection of files and data for UNIGINE projects stored in a single *.upackage file. Asset Package compresses data while preserving the original directory structure. Asset Packages can be used to conveniently transfer content between your projects or exchange data with other users, be it a single model or a scene with a set of objects driven by logic implemented via C# components.资产包是存储在单个*.upackage文件中的UNIGINE项目的文件和数据的集合。 Asset Package在保留原始目录结构的同时压缩数据。资产包可用于方便地在您的项目之间传输内容或与其他用户交换数据,无论是单个模型还是场景,场景中都有一组对象,这些对象由通过C#组件

To copy your assets from one project to another:要将您的资产从一个项目复制到另一个项目

  1. Open your source project in UnigineEditor and export all necessary assets as a package file.在UnigineEditor中打开您的源项目,然后将所有必要资产导出为打包文件
  2. Open your target project that requires those assets in UnigineEditor and import your package.在UnigineEditor中打开需要这些资产的目标项目,然后导入你的包裹

也可以看看

Creating a Package创建一个包#

To copy your project contents into a Package file:要将项目内容复制到打包文件中,请执行以下操作:

  1. Select the assets that you want to add to the Package in the Asset Browser. You can even select the folder containing the whole project, and then deselect the data you don't require. Asset Browser中选择要添加到包中的资产。您甚至可以选择包含整个项目的文件夹,然后取消选择不需要的数据。
  2. Right-click on selected asset(s) or folder(s) and choose Export As Package option in the context menu.
    右键单击选定的资产或文件夹,然后在上下文菜单中选择Export As Package选项。
  3. Now you can select assets to be exported in the Create 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.Keep in mind that any single file that you want to include must be less than 2 GB. The Package size is not limited.
    • Core files cannot be included.Core files cannot be included.
    Keep in mind that any single file that you want to include must be less than 2 GB. The Package size is not limited.Core files cannot be included.
    现在,您可以使用每个资产的复选框在创建包窗口中选择要导出的资产。
    注意
    • Keep in mind that any single file that you want to include must be less than 2 GB. The Package size is not limited.请记住,要包含的任何单个文件都必须小于2 GB。包装尺寸不受限制。
    • Core files cannot be included.不能包含核心文件。
  4. 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).
    您可以通过Include Dependencies复选框自动将所有从属资产添加到程序包(材质使用的纹理,分配给对象的材质等)(从属资产在列表中标记为绿色)。
  5. After selecting assets click Export Package to pack them into a new *.upackage file.
    注意
    At least one asset must be selected to activate the Create Package button.At least one asset must be selected to activate the Create Package button.
    At least one asset must be selected to activate the Create Package button.
    选择资产后,单击Export Package将它们打包到新的*.upackage文件中。
    注意
    At least one asset must be selected to activate the Create Package button.必须至少选择一种资产才能激活Create Package按钮。
  6. In the dialog window that opens, define the name and path to your package and click Save. 在打开的对话框窗口中,定义包的名称和路径,然后单击Save

As soon as your Asset Package is successfully created, the location of your *.upackage file will be shown in your file manager.成功创建资产包后,文件管理器中将显示*.upackage文件的位置。

Importing a Package导入包裹#

To import contents of an existing package to your project you need to:要将现有软件包的内容导入到您的项目中,您需要:

  1. Drag it from the File Explorer directly into the Asset Browser or click the Import button and select the *.upackage file. 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.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:

    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.
    将其从文件资源管理器直接拖到Asset Browser中,或单击Import按钮,然后选择*.upackage文件。如果您已经将*.upackage文件添加到目标项目中,请双击它。
    注意
    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.请勿使用操作系统的文件管理器将软件包复制到项目的文件夹中,因为在这种情况下,软件包将显示在Asset Browser中,但不会提取其内容。
    将打开以下窗口:

  2. Check the assets that are going to be imported. Assets in the package can be colored white, red, and yellow:

    • White-colored assets can be imported without any changes.White-colored assets can be imported without any changes.
    • Yellow-colored assets are imported with a postfix to resolve the name collision.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.The same asset is found in the project.
      • Asset with the same Source Runtime GUID 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.Asset with the same Runtime GUID is found in the project.
      • The specified target mount point is read-only.The specified target mount point is read-only.
      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.
      Red-colored assets cannot be imported due to one of the following reasons:
      • The same asset is found in the project.The same asset is found in the project.
      • Asset with the same Source Runtime GUID 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.Asset with the same Runtime GUID is found in the project.
      • The specified target mount point is read-only.The specified target mount point is read-only.
    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.The same asset is found in the project.
    • Asset with the same Source Runtime GUID 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.Asset with the same Runtime GUID is found in the project.
    • The specified target mount point is read-only.The specified target mount point is read-only.
    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.
    检查将要导入的资产。包装中的资产可以用白色,红色和黄色着色:

    • 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.The same asset is found in the project.
      • Asset with the same Source Runtime GUID 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.Asset with the same Runtime GUID is found in the project.
      • The specified target mount point is read-only.The specified target mount point is read-only.
      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.
      由于以下原因之一,无法导入红色资产:
      • The same asset is found in the project.在项目中找到相同的资产。
      • Asset with the same Source Runtime GUID is found in the project.在项目中找到具有相同源运行时GUID的资产。
      • Asset with the same Runtime GUID is found in the project.在项目中找到具有相同运行时GUID的资产。
      • The specified target mount point is read-only.指定的目标安装点是只读的。
  3. After selecting all assets required for import, click the Import Package button.选择导入所需的所有资产后,单击Import Package按钮。
  4. Wait for the extraction process. Extraction time depends on the size of the assets selected for the import.
    等待提取过程。提取时间取决于为导入选择的资产的大小。

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:成功导入软件包后,Asset Browser中将提供一个包含相应内容的新文件夹,并显示以下消息:

最新更新: 2022-12-14
Build: ()