Table of Contents

錄製 EED dump 文件

EED(EasyAR Event Dump)文件可用於抓取一些運行時的關鍵數據提供給 EasyAR 技術支持進行問題分析,例如一些跟蹤器的跟蹤結果、程序與 Mega 服務之間的網絡請求等。通常在使用 EIF 文件 無法重現問題的時候使用。

使用開發者模式面板錄製

運行程序,然後打開 開發者模式診斷面板(默認配置下快速點擊屏幕8次),點擊 eedrec,即可錄製。進行問題復現,然後點擊 stop 即可完成錄製。

diagnostics eed windows

錄製得到的 EED 文件路徑會在錄製時顯示。

diagnostics eed windows 2

使用腳本錄製

可以使用 EventDumpRecorder.start(string, int) 開始錄製 EED 文件,使用 EventDumpRecorder.stop() 停止錄製。

比如,下面的代碼展示瞭如何在腳本中錄製 EED 文件:

EventDumpRecorder eedRecorder;

bool RecordEED(bool on)
{
    if (on)
    {
        if (session.Assembly == null || session.Assembly.Display == null) { return false; }
        var path = Path.Combine(Application.persistentDataPath, DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss.fff") + ".eed");
        eedRecorder = EventDumpRecorder.create();
        eedRecorder?.start(path, session.Assembly.Display.Rotation);
    }
    else
    {
        eedRecorder?.stop();
        eedRecorder?.Dispose();
        eedRecorder = null;
    }
    return true;
}

相關主題