Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  3. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview 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:
    238
    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.