Search Unity

asmdefs always reference specific other packages

Discussion in 'Scripting' started by fherbst, Oct 17, 2019.

  1. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    Even when turning "Override References" on, UnityEditor.Compilation.Assembly.asseblyReferences always has specific dependencies on other Unity packages that I can't get rid of.
    (I'm trying to understand how packages/their asmdefs and compiled assemblies reference each other)

    Every single asmdef file seems to reference
    • UnityEditor.UI (from com.unity.ugui)
    • Unity.2D.Tilemap.Editor (from com.unity.2d.tilemap)
    Additionally, editor asmdefs (that are set to Editor only) also always have the following:
    • com.unity.ext.nunit
    • com.unity.test-framework
    This seems wrong, as obviously those are part of packages, and removing those packages does not break compilation for all others.

    Is that hardcoded? Why? Which other packages inject themselves in this way? It's hard to understand references when "Override References" which is supposed to give me explicit control doesn't actually override all references...

    I guess this goes to both Package Manager team @okcompute_unity and asmdef team @karl_jones
     
    Last edited: Oct 17, 2019
  2. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
  3. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802