最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

Unity_Addressable_Event Viewer(事件查看器)

2023-04-12 09:40 作者:unity_某某師_高錦錦  | 我要投稿

Use the?Addressables Event Viewer?window to monitor memory management of your Addressables assets. The window shows when your application loads and unloads assets and displays the reference counts of all Addressables system operations. The window also shows approximate views of the application frame rate and the total amount of allocated managed memory. You can use these charts to detect how Addressables events such as loading and releasing assets affect application performance and to detect assets that you never release.

譯:使用 Addressables 事件查看器窗口來監(jiān)視您的 Addressables 資產(chǎn)的內(nèi)存管理。該窗口顯示了應(yīng)用程序何時加載和卸載資產(chǎn),并顯示所有 Addressables 系統(tǒng)操作的引用計數(shù)。該窗口還顯示了應(yīng)用程序幀率和已分配托管內(nèi)存總量的近似視圖。您可以使用這些圖表來檢測 Addressables 事件(例如加載和釋放資產(chǎn))如何影響應(yīng)用程序性能,并檢測您從未釋放的資產(chǎn)。

Use the?Use Existing Build?Play Mode script to get the most accurate information in the Event Viewer in Play mode. The?Use Asset Database?script doesn't account for any shared dependencies among the Assets and the?Simulate Groups?script gives a less accurate monitoring of reference counts.

譯:在 Play 模式下,使用現(xiàn)有構(gòu)建 Play Mode 腳本以獲取事件查看器中最準(zhǔn)確的信息。Use Asset Database 腳本不考慮任何資產(chǎn)之間的共享依賴關(guān)系,而 Simulate Groups 腳本則提供了對引用計數(shù)的較不準(zhǔn)確的監(jiān)視。

IMPORTANT

To view data in the Event Viewer, you must enable the?Send Profiler Events?setting in your?AddressableAssetSettings?object's Inspector and make a new content build.

譯:要在事件查看器中查看數(shù)據(jù),必須啟用 AddressableAssetSettings 對象的 Inspector 中的 Send Profiler Events 設(shè)置,并進(jìn)行新內(nèi)容構(gòu)建。

See?Memory management?for more information about managing the memory associated with your Addressable assets.

譯:有關(guān)管理與您的 Addressable 資產(chǎn)相關(guān)的內(nèi)存的更多信息,請參見內(nèi)存管理。

Viewing Addressables events

View Addressables asset lifespan charts and events in the?Event Viewer?window:

譯:在事件查看器窗口中查看 Addressables 資產(chǎn)壽命圖表和事件:

  1. Enable?Send Profiler Events?in your Addressables settings:在 Addressables 設(shè)置中啟用 Send Profiler Events:

    1. Open your Addressable settings Inspector (menu:?Window > Asset Management > Addressables > Settings)打開 Addressable 設(shè)置的 Inspector(菜單:Window > Asset Management > Addressables > Settings)

    2. Under?Diagnostics, check the?Send Profiler Events?option.譯:在診斷下,勾選發(fā)送 Profiler 事件選項

  2. Rebuild your Addressables content using the?Default Build Script?from the Addressables Groups window.譯:使用 Addressable Groups 窗口中的默認(rèn)構(gòu)建腳本重新構(gòu)建您的 Addressables 內(nèi)容

  3. Open the?Event Viewer?(menu:?Window > Asset Management > Addressables > Event Viewer).譯:打開事件查看器(菜單:Window > Asset Management > Addressables > Event Viewer)

  4. Enter Play mode in the Editor.譯:在編輯器中進(jìn)入 Play 模式

Viewing Addressables events in a standalone player

To connect the Event Viewer to a standalone player, follow the steps under?Viewing Addressables Events?except for the last step where you enter Play mode in the Editor. Instead, perform the following, additional steps:

譯:要將事件查看器連接到獨立播放器,請按照查看 Addressables 事件下的步驟進(jìn)行操作,但最后一步不是在編輯器中進(jìn)入 Play 模式。相反,執(zhí)行以下其他步驟:

  1. Open the?Build Settings?window (menu:?File > Build Settings).譯:打開生成設(shè)置窗口(菜單:File > Build Settings)。

  2. Check the?Development Build?option.譯:勾選開發(fā)構(gòu)建選項。

  3. Check the?Autoconnect Profiler?option.譯:勾選自動連接 Profiler 選項。

  4. Open the Unity?Profiler __window (menu: __Window > Analysis > Profiler).譯:打開 Unity Profiler 窗口(菜單:Window > Analysis > Profiler)

  5. On the Build Settings window, click?Build and Run.譯:在生成設(shè)置窗口上,點擊 Build and Run

The Event Viewer automatically connects to your standalone player and displays the Addressables events that occur.

譯:事件查看器會自動連接到您的獨立播放器,并顯示發(fā)生的 Addressables 事件

See?Profiler overview?for more information about using the Unity Profiler.

譯:有關(guān)使用 Unity Profiler 的更多信息,請參見 Profiler 概述。

Event Viewer window

To access the window in the Editor, select?Window?>?Asset Management?>?Addressables?>?Event Viewer.譯:要在編輯器中訪問窗口,請選擇菜單:Window > Asset Management > Addressables > Event Viewer

事件查看器窗口

The window has three sections:

譯:該窗口有三個部分:

  • Toolbar:

    • Clear Events?button: clears all recorded frames, erasing everything in the window.譯:清除事件按鈕:清除所有記錄的幀,擦除窗口中的所有內(nèi)容。

    • Unhide All Hidden Events: returns any asset or operation lifelines that you have hidden to their normal, displayed state. Only shown when you have hidden events.譯:取消隱藏所有隱藏事件:返回您隱藏的任何資產(chǎn)或操作壽命線到其正常顯示狀態(tài)。僅當(dāng)您隱藏事件時才會顯示

    • Frame?counter: displays the position of the frame cursor and the number of recorded frames. (If the toolbar doesn't display the?Frame?counter, the frame cursor is at the current frame.)譯:幀計數(shù)器:顯示幀光標(biāo)的位置和記錄的幀數(shù)。(如果工具欄不顯示幀計數(shù)器,則幀光標(biāo)位于當(dāng)前幀。)

    • Frame step (<>) buttons: steps the frame cursor through recorded frames. (You can also use the keyboard arrow keys.)譯:幀步驟(<>)按鈕:通過記錄的幀逐步移動幀光標(biāo)。(您也可以使用鍵盤箭頭鍵。)

    • Current?button: moves the frame cursor to the current frame.譯:當(dāng)前按鈕:將幀光標(biāo)移動到當(dāng)前幀。

  • Assets?display: shows profiler and lifespan charts related to Addressables operations and assets.譯:資產(chǎn)顯示:顯示與 Addressables 操作和資產(chǎn)相關(guān)的分析器和壽命圖表。

    • FPS?chart: the application frame rate.譯:FPS 圖表:應(yīng)用程序幀率。

    • MonoHeap?chart: the amount of managed memory in use.譯:MonoHeap 圖表:正在使用的托管內(nèi)存量。

    • Event Counts: the number of Addressables events that occurred in a frame (view the events in the?Event?list).譯:事件計數(shù):在幀中發(fā)生的 Addressables 事件數(shù)量(在事件列表中查看事件)。

    • Instantiation Counts: the number of calls to?Addressables.InstantiateAsync?in a frame.譯:實例化計數(shù):在幀中對 Addressables.InstantiateAsync 的調(diào)用次數(shù)

    • Operation and asset lifespan charts: show when the system loads and releases operations or assets and display the reference counts. See?Asset lifespan chart.譯:操作和資產(chǎn)壽命圖表:顯示系統(tǒng)何時加載和釋放操作或資產(chǎn),并顯示引用計數(shù)。請參

  • Event?list: shows the Addressable operation events that occurred in the frame.譯:

You can click in the chart area of the window to pause your application and set the position of the?frame cursor. The frame cursor appears in the window as a vertical line and shows summary information for the selected frame.

譯:您可以單擊窗口的圖表區(qū)域以暫停應(yīng)用程序并設(shè)置幀光標(biāo)的位置。幀光標(biāo)會顯示為垂直線,并顯示所選幀的摘要信息

NOTE

The FPS and MonoHeap charts include all factors that affect performance, not just those related to Addressable assets.

譯:FPS和MonoHeap圖表包括影響性能的所有因素,而不僅僅是與Addressable資產(chǎn)有關(guān)的因素

Asset lifespan chart

The asset lifespan chart shows when an asset or operation is created, its current reference count, and when it is destroyed.

譯:資產(chǎn)生命周期圖表顯示資產(chǎn)或操作何時創(chuàng)建、其當(dāng)前引用計數(shù)以及何時銷毀

To expand the display line showing the lifespan of an asset or operation, click the?+?button for the entry in the?Assets?list.

譯:要展開顯示資產(chǎn)或操作壽命線的顯示行,請單擊資產(chǎn)列表中條目的“+”按鈕

To view the sub-operations or subassets of an entry, click the expand icon (>) of the parent object.

譯:要查看條目的子操作或子資產(chǎn),請單擊父對象的擴(kuò)展圖標(biāo)(>)

You can remove the lifeline of an asset or operation from the chart by right-clicking it and choosing?Hide Selected Events?on the context menu. Click the?Unhide All Hidden Events?button on the toolbar to reveal the lifelines of any hidden events.

譯:您可以右鍵單擊資產(chǎn)或操作的生命周期線,并在上下文菜單中選擇“Hide Selected Events”來從圖表中刪除它。單擊工具欄上的“Unhide All Hidden Events”按鈕以顯示任何隱藏事件的生命周期線

下面是一個資產(chǎn)生命周期示例及相關(guān)的Addressables事件

A lifespan chart shows the following information:譯:生命周期圖表顯示以下信息:


Before the asset was loaded (no display).譯:資產(chǎn)加載前(未顯示)


The asset load is in progress (dull blue).譯:資產(chǎn)正在加載(暗藍(lán)色)


The asset is loaded (blue). The green bar shows the current reference count of the asset.譯:資產(chǎn)已加載(藍(lán)色)。綠色條表示資產(chǎn)的當(dāng)前引用計數(shù)


The Event Viewer frame cursor, which shows information for the selected frame, in this case, the cursor indicates that the reference count of this asset is 4 during the selected frame.

譯:事件查看器幀光標(biāo)顯示所選幀的信息。在這種情況下,游標(biāo)指示該資產(chǎn)在所選幀期間的引用計數(shù)為4



After the asset is destroyed and unloaded (no display).

譯:資產(chǎn)被銷毀和卸載后(未顯示)



The events associated with specific frames (events are only shown at the position of the frame cursor).

譯:與特定幀相關(guān)聯(lián)的事件(僅在幀光標(biāo)位置顯示)



Unity_Addressable_Event Viewer(事件查看器)的評論 (共 條)

分享到微博請遵守國家法律
吉安市| 盐源县| 丹凤县| 克拉玛依市| 南丰县| 荔波县| 建阳市| 宜丰县| 西平县| 潼南县| 肥城市| 镇沅| 互助| 张家界市| 湟源县| 兴文县| 扬州市| 神农架林区| 临沂市| 盖州市| 佳木斯市| 巴东县| 资溪县| 江华| 闵行区| 芜湖县| 九江县| 平安县| 奉贤区| 依兰县| 自贡市| 巴楚县| 中西区| 腾冲县| 奇台县| 锦屏县| 黎平县| 开化县| 张家口市| 定州市| 长治市|