Unity3d1Learning the Interface中文翻译.docx

上传人:b****5 文档编号:7477619 上传时间:2023-01-24 格式:DOCX 页数:15 大小:874.41KB
下载 相关 举报
Unity3d1Learning the Interface中文翻译.docx_第1页
第1页 / 共15页
Unity3d1Learning the Interface中文翻译.docx_第2页
第2页 / 共15页
Unity3d1Learning the Interface中文翻译.docx_第3页
第3页 / 共15页
Unity3d1Learning the Interface中文翻译.docx_第4页
第4页 / 共15页
Unity3d1Learning the Interface中文翻译.docx_第5页
第5页 / 共15页
点击查看更多>>
下载资源
资源描述

Unity3d1Learning the Interface中文翻译.docx

《Unity3d1Learning the Interface中文翻译.docx》由会员分享,可在线阅读,更多相关《Unity3d1Learning the Interface中文翻译.docx(15页珍藏版)》请在冰豆网上搜索。

Unity3d1Learning the Interface中文翻译.docx

Unity3d1LearningtheInterface中文翻译

LearningtheInterface(学习界面)

FirstLaunch(第一次运行)

Let'sbeginlearningUnity.IfyouhavenotyetopenedUnity,youcanfinditinsideStart->Programs->UnityonWindows,orApplications->UnityonMac.TheUnityEditorwillappear.TakeyourtimetolookovertheUnityEditorinterfaceandfamiliarizeyourselfwithit.TheMainEditorWindowismadeupofseveralTabbedWindows,calledViews.ThereareseveraltypesofViewsinUnity,eachwithaspecificpurpose.

让我们开始学习Unity。

如果你还没有打开Unity,你可以在Windows里面找到开始->程序->Unity启动它,或者在Mac系统中通过Applications->Unity启动它。

你自己可以观察Unity编辑器界面并熟悉它。

主编辑器窗口是由几个选项卡式窗口组成,称之为视图。

在Unity中,有不同类型的特殊用途的视图。

ProjectView(项目视图)

EveryUnityprojectcontainsanAssetsfolder.ThecontentsofthisfolderarepresentedintheProjectView.Thisiswhereyoustorealltheassetsthatmakeupyourgame,likescenes,scripts,3Dmodels,textures,audiofiles,andPrefabs.Ifyouright-clickonanyassetintheProjectView,youcanchooseRevealinExplorer(RevealinFinderonMac)toactuallyseetheassetitselfinyourfilesystem.

每个Unity的项目包含一个资源文件夹。

此文件夹的内容呈现在项目视图。

这里存放着你游戏的所有资源,比如场景、脚本、三维模型、纹理、音频文件和预制组件。

如果你在项目视图里右击任何资源,你都可以在资源管理器中(在Mac系统中是RevealinFinder)找到这些真正的文件本身。

ImportantNote:

YoushouldnevermoveprojectassetsaroundusingtheOSsincethiswillbreakanymetadataassociatedwiththeasset.AlwaysusetheProjectViewtoorganizeyourassets.

重要提示:

不要使用操作系统来移动项目资源,因为这将破坏与资源相关的一些元数据。

你应该始终使用项目视图来组织自己的资源。

Toaddassetstoyourproject,youcandraganyfilefromyourOSintotheProjectView,oruseAssets->ImportNewAsset.Yourassetisnowreadytobeusedinyourgame.Formoreinformationaboutworkingwithassets,skipaheadtotheAssetWorkflowsectionofthemanual.

要添加资源到你的项目中,你可以拖动操作系统的任何文件到项目视图,或者使用Assets->ImportNewAsset导入新资源。

你的资源现在可以在你的游戏中使用了。

如需更多使用资源的信息,直接跳到资源工作流程手册。

 

ScenesarealsostoredintheProjectView.Thinkoftheseasindividuallevels.Forexample,theIslandsSceneloadsbydefaultwhenUnityfirstlaunches.TocreateanewScene,useControl-N(Command-NonMac).TosavethecurrentSceneintotheProjectView,useControl-S(Command-SonMac).

SomegameassetsneedtobecreatedfromwithinUnity.Todothis,usetheCreatedrop-down,orrightclick->Create.

场景也存储在项目视图中。

想想这些独特的层次。

例如,Unity第一次启动时默认加载的“孤岛危机”场景。

要创建新的场景,使用Ctrl+N(在Mac系统中使用Command-N),要在项目视图中保存当前场景,使用Ctrl+S(在Mac系统中使用Command-S)。

有些游戏资源必须从Unity内部建立。

要做到这一点,使用Create下拉菜单,或通过右键然后点击->Create来创建。

TheCreatedrop-down(Create下拉菜单)

Thiswillallowyoutoaddscripts,Prefabs,orfolderstokeepyourprojectorganized.Youcanrenameanyasset/folderbypressingF2onWindows,orEnteronMac,orwithtwopacedclicksontheassetname.IfyouholdtheAltkeywhileyouexpandorcontractadirectory,allsubdirectorieswillalsobeexpandedorcontracted.

这将允许你添加脚本、预制组件(想不出更好的名字了)、或文件夹让您的项目组织有序。

你可以在Windows系统中按F2键(Mac系统中为回车)重新命名任何资源/文件夹,或通过在资源名字上两次点击(不是双击)来重命名。

如果你按住Alt键的同时,展开或收起一个目录,所有子目录也将展开或收起。

 

Hierarchy(层次结构视图)

TheHierarchycontainseveryGameObjectinthecurrentScene.Someofthesearedirectinstancesofassetfileslike3Dmodels,andothersareinstancesofPrefabs--customobjectsthatwillmakeupmuchofyourgame.YoucanselectandParentobjectsintheHierarchy.Asobjectsareaddedandremovedfromthescene,theywillappearanddisappearfromtheHierarchyaswell.

层次视图包含了每一个当前场景的游戏对象(GameObject)。

其中一些是资源文件的实例,如3D模型和其他预制组件(完善你的游戏的自定义对象)的实例。

您可以在层次结构视图中选择对象或者生成对象。

当在场景中增加或者删除对象,层次结构视图中相应的对象则会出现或消失。

Parenting(父对象)

UnityusesaconceptcalledParenting.TomakeanyGameObjectthechildofanother,dragthedesiredchildontothedesiredparentintheHierarchy.Achildwillinheritthemovementandrotationofitsparent.YoucannowexpandandcontracttheparenttoseeitschildrenintheHierarchywithoutaffectingyourgame.

Unity使用父对象的概念。

要想让一个游戏对象成为另一个的子对象,只需在层次视图中把它拖到另一个上即可。

一个子对象将继承其父对象的动作和旋转属性。

你在层次视图中展开和收起父对象,可以看到其子对象,而不会影响你的游戏。

(这句翻译感觉有点别扭)

Twounparentedobjects(两个没有父对象的对象)

Oneobjectparentedtoanother(一个对象是另一个的父对象)

TolearnmoreaboutParenting,pleasereviewtheParentingsectionoftheTransformComponentpage.

要学习更多关于父对象的知识,请查看TransformComponentpage的关于父对象的部分。

Toolbar(工具条)

TheToolbarconsistsoffivebasiccontrols.EachrelatetodifferentpartsoftheEditor.

工具栏包括五个基本控制,每一个涉及到不同部分的编辑。

TransformTools--usedwiththeSceneView变换工具——用于场景视图

TransformGizmoToggles--affecttheSceneViewdisplay变换Gizmo(这个词是小物件、小玩意的意思,在这里不知道怎么翻译合适)开关——影响场景视图中的显示

Play/Pause/StepButtons--usedwiththeGameView运行/暂停/单步执行按钮——用于游戏视图

LayersDrop-down--controlswhichobjectsaredisplayedinSceneView层下拉菜单——控制场景视图中选中对象的显示

LayoutDrop-down--controlsarrangementofallViews布局下拉菜单——控制所有视图的排列

SceneView(场景视图)

TheSceneView(场景视图)

TheSceneViewisyourinteractivesandbox.YouwillusetheSceneViewtoselectandpositionenvironments,theplayer,thecamera,enemies,andallotherGameObjects.ManeuveringandmanipulatingobjectswithintheSceneViewaresomeofthemostimportantfunctionsinUnity,soit'simportanttobeabletodothemquickly.

场景视图是你的交互式沙箱(?

)。

你可以使用它来选择和布置环境、玩家、摄像机、敌人和所有其他游戏对象。

在场景视图中调动和操作对象是Unity最重要的功能,因此,能够迅速掌握它们是非常重要的。

SceneViewNavigation(场景视图导航)

SeeSceneViewNavigationforfulldetailsonnavigatingthesceneview.Here'sabriefoverviewoftheessentials:

∙HoldtherightmousebuttontoenterFlythroughmode.ThisturnsyourmouseandWASDkeys(plusQandEforupanddown)intoquickfirst-personviewnavigation.

∙SelectanyGameObjectandpresstheFkey.ThiswillcentertheSceneViewandpivotpointontheselection.

∙UsethearrowkeystomovearoundontheX/Zplane.

∙HoldAltandclick-dragtoorbitthecameraaroundthecurrentpivotpoint.

∙HoldAltandmiddleclick-dragtodragtheSceneViewcameraaround.

∙HoldAltandrightclick-dragtozoomtheSceneView.Thisisthesameasscrollingwithyourmousewheel.

要查看场景视图导航的全部详细资料请点击SceneViewNavigation,下面是简要概述:

●按住鼠标右键进入飞行穿越模式。

旋转你的鼠标且使用WASD键(Q向上、E向下)进入快速的第一人称视角导航。

(这句翻译也别扭,能明白意思就行)

●选择任意游戏对象,然后按F键,所选择的物体将在场景视图的中心位置显示。

●使用方向键,将沿X/Z平面方向移动。

●ALT+鼠标左键拖动使当前视野沿当前纵轴作圆周运动。

●ALT+鼠标中键拖动可以拖动当前视野。

●ALT+鼠标右键拖动可以缩放场景视野,这和你的鼠标滚轮作用相同。

YoumightalsofinduseintheHandTool(shortcut:

Q),especiallyifyouareusingaone-buttonmouse.WiththeHandtoolisselected,也许你已经发现了手形工具(快捷键:

Q),尤其是当你使用单键鼠标时,下面是各种选中状态的含义:

Click-dragtodragthecameraaround.在场景中拖动视野。

HoldAltandclick-dragtoorbitthecameraaroundthecurrentpivotpoint.ALT+鼠标左键拖动使当前视野沿当前纵轴作圆周运动。

HoldControl(CommandonMac)andclick-dragtozoomthecamera.按住CTRL(Mac系统中为Command键)+鼠标左键拖动缩放当前视野。

Intheupper-rightcorneroftheSceneViewistheSceneGizmo.ThisdisplaystheSceneCamera'scurrentorientation,andallowsyoutoquicklymodifytheviewingangle.

在场景视图右上角是场景小工具(SceneGizmo)。

这里显示场景摄像机的当前方向,你可以快速地变换视角。

YoucanclickonanyofthearmstosnaptheSceneCameratothatdirectionandchangeittoIsometricMode.WhileinIsometricMode,youcanright-clickdragtoorbit,andAlt-clickdragtopan.Toexitthismode,clickthemiddleoftheSceneGizmo.YoucanalsoShift-clickthemiddleoftheSceneGizmoanytimetotoggleIsometricMode.

你可以点击任意方向杆从而使场景摄像机朝那个方向而且变为等轴(等距)模式。

在等轴模式中,您可以鼠标右键拖动作圆周,也可以按住Alt键拖动来平移。

按SceneGizmo的中心退出此模式。

你还可以按住Shift键单击SceneGizmo的中心随时切换等轴模式。

PositioningGameObjects(定位游戏对象)

SeePositioningGameObjectsforfulldetailsonpositioningGameObjectsinthescene.Here'sabriefoverviewoftheessentials:

查看详情请点击PositioningGameObjects,下面是概述:

Whenbuildingyourgames,you'llplacelotsofdifferentobjectsinyourgameworld.TodothisusetheTransformToolsintheToolbartoTranslate,Rotate,andScaleindividualGameObjects.EachhasacorrespondingGizmothatappearsaroundtheselectedGameObjectintheSceneView.YoucanusethemouseandmanipulateanyGizmoaxistoaltertheTransformComponentoftheGameObject,oryoucantypevaluesdirectlyintothenumberfieldsoftheTransformComponentintheInspector.

建立你的游戏时,你会在你的游戏世界中放置许多不同的对象。

要做到这一点必须使用工具栏的变换工具来调动、旋转和按比例缩放个别游戏对象,每个在场景视图中选中的对象都有一个对应的Gizmo,你可以用鼠标操作Gizmo轴来改变游戏对象的转换组件,也可以在检视视图中为转换组件的各字段直接输入数字。

调动工具——快捷键“W”旋转工具——快捷键“E”缩放工具——快捷键“R”

SceneViewControlBar(场景视图控制条)

TheSceneViewcontrolbarletsyouseethesceneinvariousviewmodes-Textured,Wireframe,RGB,Overdraw,andmanyothers.Itwillalsoenableyoutosee(andhear)in-gamelighting,gameelements,andsoundintheSceneView.SeeViewModesforallthedetails.

场景视图控制条可以让你看到不同的视图模式——纹理模式,线框模式,RGB模式,透视模式,等等,它也可以让你看到(听到)游戏中的灯光、游戏要素、声音等。

点击ViewModes查看视图模式的详情。

GameView(游戏视图)

TheGameViewisrenderedfromtheCamera(s)inyourgame.Itisrepresentativeofyourfinal,publishedgame.YouwillneedtouseoneormoreCamerastocontrolwhattheplayeractuallyseeswhentheyareplayingyourgame.FormoreinformationaboutCameras,pleaseviewtheCameraComponentpage.

游戏视图显示你最后发布游戏后的运行画面,你需要使用一个或多个摄像机来控制玩家在游戏时实际看到的画面。

如需更多关于摄像机的信息,请查看CameraComponentpage。

PlayMode(运行模式)

UsethebuttonsintheToolbartocontroltheEditorPlayModeandseehowyourpublishedgamewillplay.WhileinPlaymode,anychangesyoumakearetemporary,andwillberesetwhenyouexitPlaymode.TheEditorUIwilldarkentoremindyouofthis.

使用工具条按钮控制运行模式来看看您发布的游戏如何运行。

在运行模式下,任何更改都只是暂时的,它们将在退出运行模式时重置复位。

提醒你一点,在运行模式下编辑界面会变暗。

GameViewControlBar(游戏视图控制条)

Thefirstdrop-downontheGameViewcontrolbaristheAspectDrop-down.Here,youcanforcetheaspectratiooftheGameViewwindowtodifferentvalues.Itcanbeusedtotesthowyourgamewilllookonmonitorswithdifferentaspectratios.

控制条的第一个下拉菜单是Aspect外观菜单,在这里,你可以强制游戏窗口为不同的长宽比,它可以用来测试游戏在不同长宽比的显示器中的不同情况。

FurthertotherightistheMaximizeonPlaytoggle.Whileenabled,theGameViewwillmaximizeitselfto100%ofyourEditorWindowfora

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 工程科技 > 能源化工

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1