Search Unity

Can we log what Managed code stripping removes?

Discussion in 'Editor & General Support' started by GloriaVictis, Mar 19, 2022.

  1. GloriaVictis

    GloriaVictis

    Joined:
    Sep 1, 2016
    Posts:
    133
    Hello,

    I want to get rid of unused scripts on our project. I had a hope that Managed code stripping would log out what this function deletes, so we could manually decrease the number of scripts in our project to make it work faster on the editor (as recompilation time is so long already). Is there any smart way to mass-find unused scripts?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,742
    There are "find unused assets" type tools all over the web, and some for-pay stuff on the asset store.

    I will note that removing a handful of scripts is unlikely to change your compile times meaningfully.

    I really do like your idea of a log of what got stripped though... that seems like it would be extremely useful in general.
     
  3. GloriaVictis

    GloriaVictis

    Joined:
    Sep 1, 2016
    Posts:
    133
    No "unused assets" can find scripts well, any tool available looks only for scripts not attached to any prefab/gameobject yet not usage between another code classes. This is why Managed Code Stripping log would do the job.
     
  4. makomarkus

    makomarkus

    Joined:
    Oct 28, 2020
    Posts:
    61
    So question remains - is there a log what managed code-stripping removes? Especially important to review when serializing from/to json and using reflection. So we don't get weird surprises
     
  5. makomarkus

    makomarkus

    Joined:
    Oct 28, 2020
    Posts:
    61