Search Unity

  1. We would like to hear your feedback about Unity and our products. Click here for more information.
    Dismiss Notice

How can I tell when I'm missing an asmdef?

Discussion in 'Scripting' started by AcademyOfFetishes, May 24, 2019.

  1. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    This is a continuation of my thread here: https://forum.unity.com/threads/does-unity-log-which-files-its-compiling.673615/ I've decided to create a new one with a more accurate title. In the previous thread, I said this:

    The documentation says:

    > Although not strictly required, Unity recommends that whenever you use Assembly Definitions in a project, you do so for all of the code in your project. Otherwise, when you change scripts in one of the predefined assemblies, Unity must still recompile all the code in your project, since the predefined assemblies automatically depend upon any assemblies you create using an Assembly Definition.

    What if the only reason my build is slow is because I've got a script somewhere that's not in an asmdef?​

    So my question is, how do I know that all the code in my project is under an asmdef? "Using your eyes," didn't work for me. I tried to do that 2 months ago and today I just discovered there was a folder from a library that I thought had no code in it, but it turns out it did have some nested under multiple folders. As a result, I've been dealing with 10 second compile times for 2 months instead of 3-5 second compile times. It doesn't sound like much, but a 10 second compile time is actually a 2 minute compile time, because I got so bored I would check out reddit or a chat room for "a second" while I waited before I realized that 2 minutes had passed.

    Anyway, there should be some way to tell that I've got asmdefs misconfigured, because the cost of a misconfigured asmdef can add up to hours/days of lost time. Can't unity give me a warning in these situations? How do I know that all the code in my project is under an asmdef?
     
  2. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    1,994
  3. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212