Search Unity

  1. Curious about what's going to be in 2021.1? Have a look at the 2021.1 beta blog post.
    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:
    169
    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.
     
unityunity