Search Unity

Compiler Warning in VS about reference to "UnityEngine.TextureCompressionQuality"

Discussion in 'Scripting' started by HamsterCrack, Jan 9, 2014.

  1. HamsterCrack

    HamsterCrack

    Joined:
    Oct 24, 2013
    Posts:
    11
    ...\Library\UnityAssemblies\UnityEditor.dll : warning CS1684: Reference to type 'UnityEngine.TextureCompressionQuality' claims it is defined in '...\Library\UnityAssemblies\UnityEngine.dll', but it could not be found

    I am using UnityVS to iterate on code (edit/compile) in Visual Studio 20132. The above warning recently started showing up . Any thoughts on what causes it or how to track it down? It appears benign but is warning spam. It shows up under 2 of the 5 projects:
    * .Unity.CSharp
    * .Unity.CSharp.Editor


    It does not show up for .Unity.UnityScript or .Unity.CSharp.Plugins
     
  2. MvD

    MvD

    Joined:
    Oct 26, 2010
    Posts:
    13
    Sorry, I don't have a solution, but I do have exactly the same problem. Same warning, same two projects. Also using UnityVS.
     
  3. MvD

    MvD

    Joined:
    Oct 26, 2010
    Posts:
    13
    Actually, I managed to get rid of the warning. If you look at the DLL in the Library folder with DotPeek, it actually doesn't have the TextureCompressionQuality enum member The UnityEngine.dll file in the project's Library folder is older than the same DLL in the Unity program folder. If you copy the DLL from the Unity folder into the project's Library folder, the warning disappears.
     
  4. HamsterCrack

    HamsterCrack

    Joined:
    Oct 24, 2013
    Posts:
    11
    That worked, thanks. I did notice the version in "Project\Library\UnityAssemblies\" matches the one in "Program Files\Editor\Data\PlaybackEngines\Windowsdevelopmentstandaloneplayer\". The one in "Data\Managed" is a bit larger so presumably is the version for use in the Editor that has the extra symbols that UnityEditor.dll is looking for.

    Note: if you make a build, it ignores the one in "Library\UnityAssemblies\" and copies in the one from ProgramFiles..PlaybackEngines so this seems reasonably safe.
     
    Last edited: Jan 14, 2014