Unity3d7Using the Inspector中文翻译Word格式.docx

上传人:b****6 文档编号:17655620 上传时间:2022-12-07 格式:DOCX 页数:13 大小:401.96KB
下载 相关 举报
Unity3d7Using the Inspector中文翻译Word格式.docx_第1页
第1页 / 共13页
Unity3d7Using the Inspector中文翻译Word格式.docx_第2页
第2页 / 共13页
Unity3d7Using the Inspector中文翻译Word格式.docx_第3页
第3页 / 共13页
Unity3d7Using the Inspector中文翻译Word格式.docx_第4页
第4页 / 共13页
Unity3d7Using the Inspector中文翻译Word格式.docx_第5页
第5页 / 共13页
点击查看更多>>
下载资源
资源描述

Unity3d7Using the Inspector中文翻译Word格式.docx

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

Unity3d7Using the Inspector中文翻译Word格式.docx

InspectorshowsthepropertiesofaGameObjectandtheComponentsandMaterialsonit.检视视图显示游戏对象和其组件及材质的属性

Whenyoucreateascriptyourself,whichworksasacustomComponenttype,themembervariablesofthatscriptarealsoexposedasPropertiesthatcanbeediteddirectlyintheInspectorwhenthatscriptcomponenthasbeenaddedtoaGameObject.Thiswayscriptvariablescanbechangedwithoutmodifyingthescriptitself.

Furthermore,theInspectorisusedforshowingimportoptionsofassetssuchastextures,3Dmodels,andfontswhenselected.Somesceneandproject-widesettingsarealsoviewedintheInspector,suchasalltheSettingsManagers.

当你创建一个脚本,它将作为一个自定义的组件类型,当这个脚本组件被添加到一个游戏对象中时,该脚本的成员变量将作为可直接编辑的属性陈列在检视视图中。

这样以来无需修改脚本本身就可以直接改变其变量。

此外,检视视图也用于显示资源的导入选项,如纹理、三维模型、选择字体。

某些场景和项目范围的设置也可以在检视视图中来查看,如所有的设置管理器。

AnypropertythatisdisplayedintheInspectorcanbedirectlymodified.TherearetwomaintypesofProperties:

ValuesandReferences.

检视视图中显示的任何属性都可以直接修改,有两种主要类型的属性:

赋值属性和参照(引用)属性。

∙EditingValueProperties

∙AssigningReferences

∙InspectorOptions

EditingValueProperties(编辑赋值属性)

Valuepropertiesdonotreferenceanythingandtheycanbeeditedrightonthespot.Typicalvaluepropertiesarenumbers,toggles,strings,andselectionpopups,buttheycanalsobecolors,vectors,curves,andothertypes.

赋值属性不能引用(参照)任何东西,它们可以直接编辑。

典型的赋值属性是数字、切换开关、字符串和选择弹出窗口,它们也可以是颜色、向量、曲线和其它类型。

Valuepropertiesontheinspectorcanbenumbers,checkboxes,strings..赋值属性可以是数字、复选框、字符串.

Manyvaluepropertieshaveatextfieldandcanbeadjustedsimplybyclickingonthem,enteringavalueusingthekeyboard,andpressingEntertosavethevalue.

许多赋值属性有一个文本字段,可以通过点击简单地调整,使用键盘键入一个值,然后按回车保存该值。

∙Youcanalsoputyourmousenexttoanumericproperty,left-clickanddragittoscrollvaluesquickly你也可以把你的鼠标放到一个数字属性的旁边,用左键拖动来快速滚动数值。

∙Somenumericpropertiesalsohaveasliderthatcanbeusedtovisuallytweakthevalue.有些数字属性会有一个可以直观地调整数值的滑块。

SomeValuePropertiesopenupasmallpopupdialogthatcanbeusedtoeditthevalue.有些赋值属性会弹出一个小对话框,可以用来编辑数值。

ColorPicker(拾色器)

PropertiesoftheColortypewillopenuptheColorPicker.(OnMacOSXthiscolorpickercanbechangedtothenativeOScolorpickerbyenablingUseOSXColorPickerunderUnity->

Preferences.)

颜色类型的属性将打开拾色器。

(在Mac系统中,通过Unity->

Preferences激活选项UseOSXColorPicker,这个拾色器可以更改系统自带的拾色器)

TheColorPickerreferenceintheinspectorisrepresentedby:

检视视图中的拾色器参考下图:

ColorPickerreferenceintheinspector.检视视图中的拾色器

AndopenstheColorPickerjustbyclickingonit:

打开拾色器点取颜色:

ColorPickerdescriptions.拾色器外观

UsetheEyedropperToolwhenyouwanttofindavaluejustbyputtingyourmouseoverthecoloryouwanttograb.——把鼠标放到你想要的颜色上,使用吸管工具选取颜色。

RGB/HSVSelectorletsyouswitchyourvaluesfromRed,Green,BluetoHue,SaturationandValue(Strength)ofyourcolor.——RGB/HSV选择器,让你通过调整红、绿、蓝的色相、饱和度和数值(强度)来选择颜色。

Finally,thetransparencyoftheColorselectedcanbecontrolledbytheAlphaChannelvalue.——最后,所选颜色的透明度可通过Alpha通道来控制。

CurveEditor(曲线编辑器)

PropertiesoftheAnimationCurvetypewillopenuptheCurveEditor.TheCurveEditorletsyoueditacurveorchoosefromoneofthepresets.Formoreinformationoneditingcurves,seetheguideonEditingCurves.

ThetypeiscalledAnimationCurveforlegacyreasons,butitcanbeusedtodefineanycustomcurvefunction.Thefunctioncanthenbeevaluatedatruntimefromascript.

AnimationCurve(动画曲线)类型的属性将打开曲线编辑器。

曲线编辑器允许你编辑曲线或从预置(应该是指程序自带的)中选择一个。

如需编辑曲线的更多信息,请参阅EditingCurves。

由于遗留(旧版本)原因,该类型叫做AnimationCurve,它可以用来定义任何自定义曲线的功能,该功能可以评估出脚本运行时间。

(没明白什么意思,也许等自己学习了该部分才会明白)

AnAnimationCurvepropertyisshownintheinspectorasasmallpreview:

一个动画曲线属性在检视视图中显示为一个小预览图:

ApreviewofanAnimationCurveintheInspector.检视视图中一个动画曲线的预览

ClickingonitopenstheCurveEditor:

点击它打开曲线编辑器

TheCurveEditorisforeditingAnimationCurves.曲线编辑器用来编辑动画曲线

WrappingModeLetsyouselectbetweenPingPong,ClampandLoopfortheyControlKeysinyourcurve.

ThePresetsletsyoumodifyyourcurvetodefaultoutlinesthecurvescanhave.

WrappingMode(暂时翻译为包装模式)让你在曲线中选择PingPang、Clamp和Loop(曲线弯曲)这些控制键(来调整形状)。

Presets(预置)让你修改你的曲线成为(该曲线可以拥有的)默认形状。

AssigningReferences(指定引用)

ReferencepropertiesarepropertiesthatreferenceotherobjectssuchasGameObjects,Components,orAssets.Thereferenceslotwillshowwhatkindofobjectscanbeusedforthisreference.

引用(参照)属性是这样一种属性,它可以引用其它对象如游戏对象、组件或资源。

引用槽(其实就是那个输入框)会显示可以用于此位置的对象种类。

TheAudioClippropertyslotshowsthatitacceptreferencestoobjectsoftypeAudioClip

AudioClip属性槽显示它可以引用的音频剪辑类对象

NowanAudioClipfileisreferencedintheAudioClipproperty.

现在一个音频文件被引用到了AudioClip属性上

Thistypeofreferencingisveryquickandpowerful,especiallywhenusingscripting.Tolearnmoreaboutusingscriptsandproperties,pleaseviewtheScriptingTutorialonthetutorialspage.

这种引用的类型是非常快速和强大的(我很想翻译成给力的),尤其是使用脚本的时候。

要了解更多有关使用脚本和属性的内容,请查看教程页面上的脚本指南。

ObjectreferencescanbeassignedtoareferencepropertyeitherbydraganddroporbyusingtheObjectPicker.

可以通过拖放或者使用对象选取器这两种方式给一个引用(参照)属性指定对象。

DragandDrop(拖放)

YoucanusedraganddropsimplybyselectingthedesiredobjectintheSceneView,Hierarchy,orProjectViewanddraggingitintotheslotofthereferenceproperty.

你可以在场景视图、层次视图、或项目视图中选择所需的对象,将它拖到参照属性的引用槽。

IfareferencepropertyacceptsaspecificComponenttype(forexampleaTransform)thendraggingaGameObjectoraPrefabontothereferencepropertywillworkfineprovidedthattheGameObjectorPrefabcontainsacomponentofthecorrecttype.Thepropertywillthenreferencethecomponentinquestion,eventhoughitwasaGameObjectorPrefabyoudraggedontoit.

如果参照属性接受一种特殊的组件类型(如Transform组件),那么拖放一个游戏对象或预设件到参照属性上也能很好地工作,前提是该游戏对象或预设件包含一个正确类型的组件,参照属性仍将引用这个有问题的组件,尽管它是一个你拖过来的游戏对象或预设件。

Ifyoudraganobjectontoanreferenceproperty,andtheobjectisnotofthecorrecttype,ordoesnotcontaintherightcomponent,thenyouwon'

tbeabletoassigntheobjecttothereferenceproperty.

如果你拖动一个对象到参照属性上,该对象是不正确的类型或没有包含正确的组件,那么你将不能够指派该对象到参照属性上。

TheObjectPicker(对象选择器)

YoucanclickonthesmalltargeticonnexttoareferenceslottoopentheObjectPicker.

你可以点击引用槽旁边的小图标来打开对象选取器。

如图:

ReferencestotheObjectPickerfromtheEditor.通过编辑器的对象选择器提供引用

TheObjectPickerisasimplewindowforassigningobjectsintheinspectorafterallowingyoutopreviewandsearchthoseavailable.

对象选取器是一个简单窗口,可以让你预览和搜索到可用对象之后,在检视视图中指定。

AlthoughtheObjectPickerisreallyeasytouse,thereareafewthingsyoushouldbeawareof.Thesearedescribedbelow.

虽然对象选取器是很容易使用的,但仍有一些事情是你应该知道的,说明如下。

AnatomyoftheObjectPicker.对象选择器的界面说明

1.Search:

Whentherearelotsofobjectsinthepicker,youcanusetheSearchfieldtofilterthem.ThissearchfieldcanalsosearchobjectsusingtheirLabels.——搜索:

当选择器中有很多对象,你可以使用搜索字段来筛选他们,搜索字段也可以使用标签来搜索对象。

(关于标签,请参阅资源工作流程)

2.ViewSelector:

Switchesthebaseofthesearchbetweenobjectsinthesceneandassets.——视图选择器:

切换显示搜索到的场景对象和资源对象。

3.PreviewSize:

Thishorizontalscrollbarletsyouincrease/decreasethesizeofyourpreviewobjectsinthepreviewwindow.Withthisyoucanseemoreorfewerobjectsinthepreviewwindowatanymoment.——预览大小:

这个水平滚动条可以让你增大/减小在预览窗口中的预览对象的大小。

这样你可以在预览窗口中看到更多或更少的对象。

4.PreviewWindow:

HerearealltheobjectsthatresideinyourScene/AssetsfolderfilteredbytheSearchfield.——预览窗口:

这里是由搜索字段筛选出的你的场景/资源文件夹里的所有对象。

5.ObjectInfo:

Displaysinformationaboutthecurrentlyselectedobject.Thecontentofthisfielddependsonthetypeofobjectbeingviewed,soifforexampleyoupickamesh,itwilltellyouthenumberofverticesandtriangles,andwhetherornotithasUV'

sandisskinned.However,ifyoupickanaudiofileitwillgiveyouinformationsuchasthebitrateoftheaudio,thelength,etc.——对象信息:

显示当前选择的对象的信息。

此区域的内容取决于当前查看对象的类型,例如,如果你选择一个网格,它会告诉你顶点和三角形的数量,是否有UV,是否有蒙皮;

如果你选择一个音频文件,它将给你音频比特率、长度等信息。

6.ObjectPreview:

Thisalsodependsonthetypeofobjectyouareviewing.Ifyouselectamesh,itwilldisplayyouhowthemeshlooks,butifyouselectascriptfile,itwilljustdisplayaniconofthefile.——对象预览:

这也取决于你当前查看对象的类型。

如果您选择一个网格,它会显示你怎样观察网格,但如果你选择一个脚本文件,它只会显示该文件的图标。

TheObjectPickerworksonanyassetyouhaveinyourproject,whichcanbeavideo,asong,aterrain,aGUIskin,ascriptingfile,oramesh;

itisatoolyouwilluseoften.

对象选择器工作于项目中的任何资源上,它可以是一个视频、歌曲、地形、图形用户界面的皮肤(以后这个词不翻译为好)、脚本文件、网格,它是一个你会经常使用的工具。

Hints(提示)

∙UseLabelsonyourAssetsandyouwillbeabletofindthemmoreeasilybysearchingforthemusingthesearchfieldoftheObjectPicker——在资源上使用标签,将能够使你在对象选取器中利用搜索字段更容易找到它们。

∙Ifyoudontwanttoseethedescriptionsoftheobjectsyoucanmovethesliderinthebottommiddleofthepreviewwindowdownward.——如果你不想看到对象的描述,你可以向下拖动预览窗口底部中间的滑块。

∙Ifyouwanttoseeadetailedpreviewoftheobj

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

当前位置:首页 > 高中教育 > 理化生

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

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