Search Unity

Question Unity Profiler log data read, write, export in a file, Profiler window not accessible through code

Discussion in 'Documentation' started by adityakaishav, Aug 19, 2021.

  1. adityakaishav

    adityakaishav

    Joined:
    Jan 16, 2019
    Posts:
    27
    Hi Unity fellas,

    My requirements:
    I want to run my unity build on a device for certain amount of time with Editor Profiler connected to that device, and I want to save all profiler data recorded in that period in a file (.data) on the dedicated location. Then I want to extract or convert that .data file into one or multiple .csv's files to analyze the performance of my game.

    1. How to save/change extension of Profile.logfile (want in .data format)
    2. How to save profiler data for a period of time in a single file (.data file)
    or
    3. Suggest a better way to do fulfill my requirements.

    My doing:
    Currently I am using Profiler.Logfile to save profiler data which actually save only 300 frames and the extension of that file is .raw, but I want that file in .data extension. So my first wanted help is, how to convert or save that .raw file into .data file. Please let me know a way to do that. After that I am saving all frames data in sample of 300 frames via code by creating lots of files each containing data of 300 frames but all are in .raw format. I want to know when I save data through code using logfile it gives .raw file but when I export profiler data from Profiler Window then it gives .data file, why is that so, please let know that too. and also is there any other way to save more that 300 frames at once. (apart from changing setting of profiler up to 2000 frames coz that causes performance and I do not want that).
    I am doing RnD from one week, Please help to achieve my task. Thanks in advance. any related help will be appreciated.