



全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Asset Workflow(资源工作流程)Here well explain the steps to use a single asset with Unity. These steps are general and are meant only as an overview for basic actions. For the example, well talk about using a 3D mesh. 这里我们讲解Unity的单一资源的使用步骤,这些步骤是通用的且仅作为基本动作的概述,在本例中,我们将讨论如何使用一个三维网格。Create Rough Asset(创建粗糙资源)Use any supported 3D modeling package to create a rough version of your asset. Our example will use Maya. Work with the asset until you are ready to save. For a list of applications that are supported by Unity, please see this page. 使用任何Unity所支持的3D建模软件来创建一个粗制版资源,我们的例子将使用Maya,使用资源工作,直到你准备好保存。要查看Unity所支持的应用程序列表,请参阅this page。Import(导入)When you save your asset initially, you should save it normally to the Assets folder in your Project folder. When you open the Unity project, the asset will be detected and imported into the project. When you look in the Project View, youll see the asset located there, right where you saved it. Please note that Unity uses the FBX exporter provided by your modeling package to convert your models to the FBX file format. You will need to have the FBX exporter of your modeling package available for Unity to use. Alternatively, you can directly export as FBX from your application and save in the Projects folder. For a list of applications that are supported by Unity, please see this page. 当你最初保存你的资源时,你应该将它保存到项目文件夹的资源文件夹中,当你打开Unity的项目,资源将被检测并导入项目中,查看项目视图,你会看到保存的资源已经在那里了。请注意,Unity使用FBX输出模型组件把你的模型转换为FBX文件格式。你需要有Unity可使用的FBX输出模型组件,或者,你可以从应用程序直接导出为FBX并保存在项目文件夹中。要查看Unity所支持的应用程序列表,请参阅this page。Import Settings(导入设置)If you select the asset in the Project View the import settings for this asset will appear in the Inspector. The options that are displayed will change based on the type of asset that is selected. 如果你在项目视图中选中一个资源,该资源的导入设置将出现在检视视图中,其中显示的可以改变的选项是以选中的资源类型为基础的。Adding Asset to the Scene(添加资源到场景中)Simply click and drag the mesh from the Project View to the Hierarchy or Scene View to add it to the Scene. When you drag a mesh to the scene, you are creating a GameObject that has a Mesh Renderer Component. If you are working with a texture or a sound file, you will have to add it to a GameObject that already exists in the Scene or Project. 只需从项目视图点击拖动网格(?)到层次视图或场景视图就可将其添加到场景中。当你将其拖动到场景中时,你就已经创建了一个具有网格渲染器组件的游戏对象。如果你要使用一个纹理或声音文件,你必须将它添加到一个已存在于场景或项目中的游戏对象上。Putting Different Assets Together(把不同资源联系在一起)Here is a brief description of the relationships between the most common assets 这里是最常见的资源之间的关系的简要说明 A Texture is applied to a Material 一种纹理应用于一种材质 A Material is applied to a GameObject (with a Mesh Renderer Component) 一种材质应用于一个游戏对象(带有网格渲染组件) An Animation is applied to a GameObject (with an Animation Component) 一个动画应用于一个游戏对象(带有动画组件) A sound file is applied to a GameObject (with an Audio Source Component) 一个声音文件应用于一个游戏对象(带有音源组件)Creating a Prefab(创建一个预设件)Prefabs are a collection of GameObjects & Components that can be re-used in your scenes. Several identical objects can be created from a single Prefab, called instancing. Take trees for example. Creating a tree Prefab will allow you to instance several identical trees and place them in your scene. Because the trees are all linked to the Prefab, any changes that are made to the Prefab will automatically be applied to all tree instances. So if you want to change the mesh, material, or anything else, you just make the change once in the Prefab and all the other trees inherit the change. You can also make changes to an instance, and choose GameObject-Apply Changes to Prefab from the main menu. This can save you lots of time during setup and updating of assets. 所谓预设件(Prefabs)就是一个游戏对象及其组件的集合,它可以在你的场景中重复使用。几个相同的对象可以通过一个单一的预设件来创建,叫做实例化。拿树来举例,创建一个树的预设件你就可以实例化几个相同的树木将它们放置到你的场景里,由于这些树都是和预设件联系在一起的,在预设件上所做的任何更改将自动应用于所有的树。所以,如果你想改变网格、材质、或者别的什么,你只要在预设件中改变一次,所有树将继承这些变动。你也可以改变一个实例,通过主菜单选择GameObject-Apply Changes to Prefab应用更改到预设件。这可以在你设置和更新资源时节省大量的时间。When you have a GameObject that contains multiple Components and a hierarchy of child GameObjects, you can make a Prefab of the top-level GameObject (or root), and re-use the entire collection of GameObjects. 当你拥有一个包含多个组件和子对象层次的游戏对象时,你可以创建一个顶级游戏对象(或者根级)的预设件,并重新使用游戏对象的全部集合。(原话没明白什么意思)Think of a Prefab as a blueprint for a structure of GameObjects. All the Prefab clones are identical to the blueprint. Therefore, if the blueprint is updated, so are all the clones. There are different ways you can update the Prefab itself by changing one of its clones and applying those changes to the blueprint. To read more about using and updating Prefabs, please view the Prefabs page. (你可以这样想象)一个预设件就是一个游戏对象的结构蓝图,所有的预设件克隆体都和蓝图相同,因此,如果蓝图更新,所有克隆体也都更新。通过不同的方法可以更改预设件本身,改变一个克隆体并且将这些改变应用于蓝图。要阅读更多关于预设件的使用和更新问题,请查看Prefabs页面。To actually create a Prefab from a GameObject in your scene, first create a new Prefab in your Project View. Name the new Prefab whatever you like. Then, click on the Game Object in the scene that you want to make into a Prefab. Drag it to the new Prefab, and you should see the Game Objects name text turn blue. You have now created a re-usable prefab. 要在你的场景中真正通过游戏对象创建一个预设件,首先要在项目视图中创建一个新的预设件,并给它一个你喜欢的名字,然后,在场景中将那个你想使之成为预设件的对象拖动到刚才新建的那个预设件上,你可以看到该对象的名称文字变成了蓝色,现在你已经创建了一个可重复使用的预设件。Updating Assets(更新资源)You have imported, instantiated, and linked your asset to a Prefab. Now when you want to edit your source asset, just double-click it from the Project View. The appropriate application will launch, and you can make any changes you want. When youre done updating it, just Save it. Then, when you switch back to Unity, the update will be detected, and the asset will be re-imported. The assets link to the Prefab will also be maintained. So the effect you will see is that your Prefab will update. Thats all you have to know to update assets. Just open it and save! 你已经完成了一个预设件的导入、实例化、和链接到资源。现在,你要编辑资源只需从项目视图中双击它,将启动相应的程序,你可以做任何更改。当你完成更新,只需将其保存。然后,当你切换回Unity,资源的更新将被检测到并重新导入,资源到预设件的链接也将维持不变,你将看到你的预设件会更新。这些就是你必须知道的更新资源的内容,只需打开和保存它。Optional - Adding Labels to the Assets.(可选给资源添加标签)Is always a good idea to add labels to your assets if you want to keep organized all your assets, with this you can search for the labels associated to each asset in the search field in the project view or in the obje
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 办公用品耗材购销合同
- 中医药内科学试题及答案
- 中医玄学考试题及答案
- 文化遗产数字化保护中的区块链技术应用与安全报告
- 2025年康复医疗服务体系与康复康复康复机构运营品牌危机管理报告
- 普法常识题库及答案
- 2024年大学生助学贷款知识竞赛题库及答案
- 成都汽车修理工初级考试题与答案
- 2025-2030中国热塑性聚烯烃(TPO)膜产业前景动态及需求趋势预测报告
- 2025-2030中国漂移克星行业运行状况及未来趋势预测报告
- 2025年中药调剂师试卷及答案
- 2025年时事政治考试题及参考答案(100题)
- 井工煤矿风险监测预警处置方案之安全监控系统监测预警处置方案
- 员工社保补贴合同协议
- 国际反洗钱师cams考试真题中文版题库汇总(含答案)
- 新生儿疾病诊疗规范诊疗指南诊疗常规2022版
- 达格列净课件
- 教学设计原理 加涅 完整笔记
- 谢祥德谈宽窄巷子的运营
- 雪铁龙世嘉用户使用手册
- 医院洁净空调系统运行管理维护保养手册
评论
0/150
提交评论