《Unity3D性能消耗分析器.docx》由会员分享,可在线阅读,更多相关《Unity3D性能消耗分析器.docx(9页珍藏版)》请在三一办公上搜索。
1、Teverticalscaleofthetimelineismanagedautomaticallyandwillattempttofilltheverticalspaceofthewindow.NotethattogetmoredetailinsaytheCPUUsageareayoucanremovetheMemoryandRenderingareas.Also,thesplitterbetweenthetimelineandthestatisticsareacanbeselectedanddraggeddownwardtoincreasethescreenareausedfortheti
2、melinechart.时间轴的垂H刻度足自动行理,并尝试填补河口的车收吃间.请留意.卷狭和变为关于CPU的运用率(CPUUSage)的细微环小魅可以刮除内存Memory)和渲染(Rendering)区域.此外.时间柏和统计区域之向的别离辖能战选卦和向下拖功,为时间轴图表增加屏窑面积.Thetimelineconsistsofseveralareas:CPUUsagezRenderingandMemory.Theseareascanberemovedbyclickingtheclosebuttoninthepanel,andre-addedagainusingtheAddAreadropdow
3、nintheProbar.时何知包括几个方面:CPU运用也池案和内行,这些区域可以在面板上C吓关闭按机切除和在分析控件(Pro)工具栏中运用AddArea下拉菜单再次正新添加,CPUUsageArea(CPU运用率区域)5Profiler14.2%1.6%0.7%0.0%11.3%6.7%6.4%5.6%0.4%DrawingCullingCUITexcRenderCameraJmAgeEFfectsMeshSkInningOverheadFueicellGlow1.ookAt.UpdateOObjcctRotater.Update)AGU1.RePaIm47.1%l.7%1.4%0.0%11
4、.3%6.7%6.4%S.6%3.5%2OB2OB2OB2OB1OB1OB33264B46OB12.1KBS30.l0.1.0.0120.70.70.60.4TheCPUUsageareadisplayswheretimeisspentinyourgame.When及Isselected,thelowerpanedisplayshierarchicaltimedatafortheselectedframe.CPU应用率区域显示你的嬉戏在照里花明时间当这个M城被i中.卜部由格中域东选定的M房次化的时何数据Hierarchymode:DiSPIayShierarchicaltimedata.层级模
5、式IHJerarchymodeh必求层次化的时间数据.GroupHierarchymode:Groupstimedataintologicalgroups(Rendering,Physics,Scriptsetc.).Becausechildrenofanygroupcanbeindifferentgroup(e.g.somescriptmightcallrenderingfunctions),thepercentagesofgrouptimesoftenadduptomorethan100%.(Thisisnotabug.)祖层线梭式(GroupHierarchymode)成设M组的组时间数
6、据:涓染Rendering物理(Physics).M*(ScriptsI等)因为任何IB的子成员,可在不同的阻(例如一些脚本可能调用Ia派功健)组时何的百分比往(E加起来招过100%,(这不是一个锚误TewaytheCPUchartisstackedcanbereorderedbysimplydraggingchartlabelsup&down.CPUftllMeshRenderer.Render15.6%1.2%6SOB1.7Shade1.Sctfass1S.O1S.O78OBASkinnedMeshRenderer.Render1.2%0.0%6OB0.1ParticIcRcnderer.
7、Render1.0%0.S%1OB0.1.Cullingl.7%1.6%2OB0.1CUITexcRender1.4%0.7%2OB0.1.CamerdJmageEffects0.0%0.0X2OB0.0MeshSkinning113%11.3%1OB12Shader.SetPassIsselectedanditscontributionIshighlightedinthechart.ShadenSetPassWii.图表中高亮显示。Inthehierarchicaltimedatatheselftimereferstotheamountoftimespentinaparticularfunc
8、tionnotincludingthetimespentcallingsub-functions.Inthescreenshotabove,forexample51.2%oftimeIsspentIntheCamera.Renderfunction.ThisfunctiondoesaIOCOfworkandcallsthevariousdrawingandcullingfunctions.Excludingallthesefunctionsonly0.8%oftimeisspentactuallyintheCamera.Renderfunction.在分层的时间攻幅的自我时间(selftime
9、I折花费在特定南攻的时间.不包括得Mf由攻所花费的时同.aI为的故图,例如51.2%的时何佗货4Camera.RenderhR,这个函数做门午多工作.并调用各种绘图和剔除的由数,%实上解除了全部这些功能只行0.8%的时间花我在Camera.Render函数RenderingArea沮染区域DrawCalls:1Tris:760Verts:525BatchedDrawCaIIs:0BatchedTris:0hatchedVerts:0UsedTextures:1/08RenderTextures0/0BRendcrTcxtureSwitches0Screen:632x3S0I2.5M8VRAMu
10、sage:2.5MBto2.7MB(of2S6.0MB)VBOTotal:36-170.1KBVBUpIoads:0-0BIBUpIoads:0-0BShadowCaster0VisibleSkinnedMcshes0Animations.0TheRenderingareadisplaysrenderingstatistics.TheNumberofDrawCalls,TnanglesandVerticesrenderedisdisplayedgraphicalinthetimeline.The1.owerpanedisplaysmorerenderingstatisticsandthesem
11、orecloselymatchtheonesshownintheGameViewRenderingStatisticswindow.泊染区域品示泣案统il数据-DrawCalls,角形和顶点泊及双T花时向柏匕隘示以图形的方式,下都窗格中显示史方演染统计数据,这些数据与在她成视图消柒统if*数据111显示的数据相P1.配.MemoryArea内存区域ProfilerAddProfilerlAudioS,力J1.VWgSourcesClRausfdSourcesUAUdK)VoicesAudioMemorPlayingSources:OPausedSourcesiOAudioVoicesiOAud
12、loCPUUsage:0.1%AudioMemory:285.0KBMaxAudioMemoryUsage:285.0KBTheAudioareadisplaysaudiostatistics:齐顿区域H示音频统计iIK: PlayingSourcesisthetotalplayingsourcesinthesceneataspecificframe.Monitorthistoseeifaudioisoverloaded.播放源PlayingSources)是在特定的Mb场跟上播放源的总(监视此仆方官或是否被IUh PausedSourcesisthetotalpausedsourcesint
13、hesceneataspecificframe.号件源:PausedSourcesJ处在特定的棘.场疑上苦停课的总数 AudioVoiceistheactuallynumberofaudio(FMODchannels)voicesused.PlayOneShotsusingvoicesnotshownInPlayingSources.书嫉声音IAudioVoice足实l七用许顿IFMOD顿道声音的Jh1.PIaYOneShot运用的是不公显示在播放iKIPIayingSources)的小存 AudioMemoryisthetotalRAMusedbytheaudioengine.舟i内存(Au
14、dioMemory)音物引繁所运用的内存电尿.CPUusagecanbeseeninthebottom.MonitorthistoseeifAudioaloneistakinguptoomuchCPU.住啜那可见的CPU运川率,为祭达籽If音嫉是否单独占用太多的CPUPhysicsArea物理学区域PhyssiAct)eRtgidbodies一NumberofConuProfilerAddProfilerActiveRigidbodies1SleepingRigidbodies:ONumberofContacts:OStaticColliders.ODynamicColliders:1GPUA
15、rea(GPU区域)6ProfilerAddFrofilerjORecordIDeepProfileAcbvProfiler)当应用积序在设各上启动,在Unity的呜辑翻开分析戕由UWindOW-Profiler)Ifyouareusingafirewall,youneedtomakesurethatports54998to55511areopeninthefirewallsoutboundrules-thesearetheportsusedbyUnityforremoteprofiling.假如运用了防火堵,你必;浦保用U54998到55511在防火塔的出站规那么被M开,这些.端”都是UEt
16、y远程分析要运用的端口.Note:SometimesUnityEditormightnotautoconnecttothedevice.InsuchcasesprofilerconnectionmightbeinitiatedfromProfilerWindowActiveProfilerdropdownmenubyselectappropriatedevice.出有时.在Unity的俄的器可能不会自动连接迷该设招在这种状况下.在分析部窗口的ActiVePrOfMer卜拉泰千顶透撑掷相应的设备,分析81连接,工AndroidRemoteprofilingcanbeenabledonAndroi
17、ddevicesthroughtwodifferentpaths:WiFiorADB.近程分析可以在Android设备通过两种不同的途径后用:WiFiiAADB.ForWiFiprofiling,followthesesteps:对IWiFi分析.川以下的这些步骤:5 MakesuretodisableMobileDataonyourAndroiddevice.WffiiKAndriod设在S用手机数据6 ConnedyourAndroiddevicetoyourWiFinetwork.连接Android设备到你的WifiMffk7 ChecktheAutoconnectProfiler*ch
18、eckboxinUnitysbuildsettingsdialog.在Unity编评出双时话框,检代AutoconnectProfiler史选根是古勾迭,8 AttachyourdevicetoyourMac/PCviacableandhitwBild&RuninUnityEditor.通过数界线连接你的谀餐到电IK在UniIV点击Build&Run.9 Whentheapplaunchesonthedevice,opentheprofilerwindowinUnityEditor(Wldow-Profiler)当应用程序在次数上启动在Unity翻开分析器窗口(Window-Profierj.
19、IOIftheUnityEditorfailstoautoconnecttothedevice,selecttheappropriatedevicefromtheProfilerWindowActiveProfilerdropdownmenu.假如Unity无法自动连接到该&的从分析器腐WAcHvePro印er下拉菜冷,选择相应的役备,Note:TheAndroiddeviceandhostcomputer(runningtheUnityEditor)mustbothbeonthesamesubnetforthedevicedetectiontowork.WjS:AndIoid设番和主机计算机
20、(正运行UNty)必需两挣在同子网才能正常运行设备检测作.ForADBprofiling,followthesesteps:时fADB分析,用以F的这些步骤I AttachyourdevicetoyourMac/PCviacableandmakesureADBrecognizesthedevice(i.e.itsowsinadbdeviceslist).通过数第戏煌接设备到电脑,并确保ADBiQ备设备也就是说它显示在ADB仪备列表) OpenaTerminalwindow/CMDpromptandenter加开个终端窗口/CMD提示符件输入adbforwardtcp:54999localabs
21、tract:Unity- CeckDevelopmentBuild-checkboxinUnitysbuildsettingsdialog,andhit,Build&Run.在Unity编洋巾对话机出代DevelopmentBuild要板是否勾i并点缶Build&Run Whentheapplaunchesonthedevice,opentheprofilerwindowInUEtVEditor(Window-Profiler)当应用程序在设各上启动.在UnityIB开分析器窗【IWindow-Profiler), SelecttheAndroidProfiler(:54999)fromthe
22、ProfilerWindowActiveProfilerdropdownmenu.从分析器的IActiveProfiler门*菜单项选杼扑AndedPrOfW”:4999)Note:TheentryinthedropdownmenuisonlyvisiblewhentheselectedtargetisAndroid.留却进入下拉菜单中选择H标是Android曜可见时选拉.Ifyouareusngafirewall,youneedtomakesurethatports54998to55511areopeninthefirewll,soutboundrules-thesearetheportsusedbyUnityforremoteprofiling.假如运Mr防火塔.你必常确保册门54998列55511在防火塔的出站现邠么般翻开这些却1都是Unlty远程分析要运川的端口.