您需要 登录 才可以下载或查看,没有账号?注册
x
本帖最后由 Thepoly 于 2022-3-24 20:04 编辑
Hello,大家好。 本内容由Kinglary分享 游戏引擎相关内容 1.9 将custom package从你的项目中导出1.9 Exporting custom packages from your project
Creating packages can be a very useful and practical way of storing your game objects and assets for future use and reference. If you want to save a feature, a group of assets, or even a prefab from the project you are currently working on, it's a good idea to export them as a package, so you can easily import them into your future projects. 打包(Creating packages)是储存你的游戏对象和资源的十分实用且实际的方法,便于以后继续使用和参考这些内容。如果你想在当前的工程里保存一个功能、一组资源、或者是一个预设,将他们作为Package输出,是一个很棒的方法,你可以非常容易的将它们导入到未来的项目(工程)之中。 Getting ready(准备工作) In order to export a package, you will need a project containing some assets. If you need one for testing purposes, please use the one inside the downloadable content for this book, which can be found inside the 0423_01_10 folder. 为了实现导出包的操作,你需要一个包含一些资源的项目。如果你需要一个测试对象,请在本书的下载内容中,找到0423_01_10文件夹,选取一组进行使用。(这里面的这个文件夹应该是本书自带的电子资源,目前没有,不过不影响学习)。 How to do it...(如何去做) To export content as a custom package, follow these steps: 将项目内容作为custom package导出,需要遵循以下步骤:
1.Select the RotatingCube prefab in the Project view. 1.在项目视窗中,选中RotatingCube预设。
2.Go to the Assets menu and choose the Select Dependencies option. This will highlight,inside the Project tab, all assets that are linked to the RotatingCube prefab. 2.进入Assets菜单,选中Select Dependencies(选择附属资源,比如,你导进来个模型A,这个模型有贴图B放在material里,你选择A,再点select Dependencies,B也亮)选项,我们会看到在项目栏中,凡是和RotatingCube预设有关联的资源全部会高亮显示。
3.Once again, select only the RotatingCube prefab. 3.重新做一遍,这次我们只选中RotatingCube预设。
4.Go to the Assets menu and choose Export Package.... A new window will now pop up: 4.进入Assets菜单,选择Export Package....(导出为包),一个新的窗口就会出现: 5.Inside the Exporting Package window, make sure the Include dependencies checkbox is selected. It is important that checkboxes for all listed objects are also selected. 5.在导出包窗口中,确认Include dependencies项是在勾选状态下的,这是非常重要的,可以保证在窗口中列出的所有项目都是被选中的。 6.Click Export and save your package into your disk. You can give it any name you want(although a name similar to RotatingCube will make things easier later, when you want to use it). 6.点击导出(Export),保存包到你的硬盘,你可以给导出的包任意一个名字(你可以取一个和RotatingCube相近的名字,这样在你想使用它的时候找起来比较方便。注意:全英文路径,命名尽量别用空格)
7.Your custom package is ready to be imported. 7.你的自定义包已经打包好,可以随时准备导入了。
How it works...(工作原理) By exporting a package, you have stored your selected objects and dependencies into a single compressed file. Importing them to your project will uncompress them into its Assets folder. 通过输出为包(打包),你可以将你所选择的项目以及与之相关的资源保存到一个单独的压缩文件之中。把他们再次导入到你的项目后,会将他们解压到你的Assets文件夹之下。
|