kareem329
kareem329

Reputation: 13

'Texture2D' does not contain a definition for 'ignoreMipmapLimit' error

I just opened my unity 2d project and these 3 errors appeared,

Library\PackageCache\[email protected]\Editor\PlasticSCM\UI\Images.cs(441,20): error CS1061: 'Texture2D' does not contain a definition for 'ignoreMipmapLimit' and no accessible extension method 'ignoreMipmapLimit' accepting a first argument of type 'Texture2D' could be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\[email protected]\Editor\PlasticSCM\UI\Images.cs(441,48): error CS1061: 'Texture2D' does not contain a definition for 'ignoreMipmapLimit' and no accessible extension method 'ignoreMipmapLimit' accepting a first argument of type 'Texture2D' could be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\[email protected]\Editor\PlasticSCM\UI\Images.cs(451,20): error CS1061: 'Texture2D' does not contain a definition for 'ignoreMipmapLimit' and no accessible extension method 'ignoreMipmapLimit' accepting a first argument of type 'Texture2D' could be found (are you missing a using directive or an assembly reference?)

the errors weren't there last time I closed the project

when I click on the error message it takes me to a script I never created called "Images.cs"

In the script, the 3 errors are under each "ignoreMipmapLimit" in these lines:

        internal static Texture2D GetNewTextureFromTexture(Texture2D texture)
        {
            Texture2D result = new Texture2D(texture.width, texture.height);
            result.ignoreMipmapLimit = texture.ignoreMipmapLimit;

            return result;
        }

        internal static Texture2D GetNewTextureFromBytes(int width, int height, byte[] bytes)
        {
            Texture2D result = new Texture2D(width, height);

            result.LoadImage(bytes);
            result.ignoreMipmapLimit = true; // ignore global quality settings

            return result;
        }

I tried closing and opening the project again but the errors were still there,

I also reimported all the assets but the errors were still there

Upvotes: 0

Views: 3576

Answers (1)

shingo
shingo

Reputation: 27341

  1. Close Unity.

  2. Open this file <Project Root Folder>\Packages\manifest.json with a text editor.

  3. Find this line "com.unity.collab-proxy":"2.0.3", delete it, save file.

  4. Open Unity. If you still need this package, you can install the lastest version from the package manager, search "Unity Collaborate".

Upvotes: 6

Related Questions