Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Feedback Request: Built-in code reference/usage analysis

Discussion in '2020.2 Beta' started by Timboc, May 15, 2020.

  1. Timboc

    Timboc

    Joined:
    Jun 22, 2015
    Posts:
    234
    Struggled to decide on the best forum for this request so apologies in advance if it doesn't belong here.
    It would be amazing to have some way of finding e.g. usage count of a method in compiled code. A user on the discord has done something like this using Roslyn (https://i.lu.je/2020/NywmDEeQNd.mp4) but they had to use additional binaries etc. I'm wondering especially with all the new burst inspector functionality might there be a possible way to cleanly get an api akin to this in-editor?

    In my case, I'm making a DOTS based asset that makes heavy use of code-gen. Allowing a user to know it was safe to remove previously generated code (via such analysis) in-editor, independent of their ide would be incredibly useful. Obviously the more broad usage like shown in the video would be really powerful in general too.

    Is this something feasible to add? Or even better, am I missing some existing functionality that would allow this?

    Many thanks in advance.