title: How do I extract Unity’s Profiler data programmatically
body: <p>I am trying to achieve the following Task;</p>
  <ol>
  <li>Extract data from Unity Profiler in <strong>.raw</strong> file format into a directory.</li>
  <li>Convert the .raw file format into <strong>.pdata</strong> file format into a directory.</li>
  <li>Convert and save .pdata format into a <strong>.csv</strong> file format.</li>
  </ol>
  <p>Here's what I am trying to achieve:
  <a href="https://i.stack.imgur.com/M6K3v.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/M6K3v.png" alt="enter image description here" /></a></p>
  <p>However, I have only been able to save Unity's Profiler data in <strong>.raw</strong> format using the code attached and extracted the results into a directory.
  <a href="https://i.stack.imgur.com/zJO33.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zJO33.png" alt="enter image description here" /></a></p>
  <p>Each <strong>.raw</strong>file contains 300 frames; the code runs in a loop continuously unstill stopped.
  <a href="https://i.stack.imgur.com/5mb4t.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5mb4t.png" alt="enter image description here" /></a></p>
  <p>Thank you</p>