Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

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.