- Home /
Unity 4.5 error
My game was working before I upgraded, but I wanted to use a new 2D function. Now that's it's upgraded, I get the following:
importer.GetNPOTScale() == TextureImporter::kNPOTKeep and !hasError
Please help me figure out what this is, as I never have seen this before.
I'm getting the same issue with NGUI. It started after I upgraded to Unity 4.5.
importer.GetNPOTScale() == TextureImporter::kNPOT$$anonymous$$eep
UnityEditor.AssetDatabase:ImportAsset(String, ImportAssetOptions) NGUIEditorTools:$$anonymous$$akeTextureAnAtlas(String, Boolean, Boolean) (at Assets/NGUI/Scripts/Editor/NGUIEditorTools.cs:492)
NGUIEditorTools:ImportTexture(String, Boolean, Boolean, Boolean) (at Assets/NGUI/Scripts/Editor/NGUIEditorTools.cs:506)
NGUIEditorTools:ImportTexture(Texture, Boolean, Boolean, Boolean) (at Assets/NGUI/Scripts/Editor/NGUIEditorTools.cs:525)
UIAtlas$$anonymous$$aker:ExtractSprites(UIAtlas, List`1) (at Assets/NGUI/Scripts/Editor/UIAtlas$$anonymous$$aker.cs:516)
UIAtlas$$anonymous$$aker:UpdateAtlas(List`1, Boolean) (at Assets/NGUI/Scripts/Editor/UIAtlas$$anonymous$$aker.cs:648)
UIAtlas$$anonymous$$aker:OnGUI() (at Assets/NGUI/Scripts/Editor/UIAtlas$$anonymous$$aker.cs:1006)
UnityEditor.DockArea:OnGUI()
Answer by akasurreal · Jun 25, 2014 at 10:01 PM
My atlas textures were set to texture type of Sprite, and I changed to Advanced. I no longer get the error. Hope it works for others.
Doesn't work for me. I noticed it happens only in 2D Unity projects.
I'm using advanced and a 3d scene, and still get the error if I set spritemode to multiple. If I then edit my sprites, and switch back to sprite mode none, the error goes away, but then I can no longer access the sprites as subassets of the texture.
Answer by vickygroups · Jun 07, 2014 at 03:46 PM
got the answer on Twitter. Hit "play" and RED error goes away. Seems like a bug.
Not really. The error was printed when Unity had trouble reading one of your textures, and it just hangs around, waiting for you to read it.
Play just happens to clear that window, but so does clicking Clear. Unity won't let you clear script errors, since you have to fix them. But, even though the message is gone, the problem with the texture is still there.
But, sometimes Unity gives a red import error, but is able to fix things anyway. Or, the problem might be with a texture you never use. NPOT means non-power of 2 (like 217 by 134.) As Jeff $$anonymous$$ writes, you could reimport each one, to see which is the problem.
Answer by Jeff-Kesselman · Jun 04, 2014 at 08:57 PM
Have you tried reimporting all your assets?
I have this error, and I just tried reimporting my assets, and the error persists.
Answer by TrainWrek · Dec 21, 2014 at 02:07 PM
I was able to fix this error by changing the texture type of the created atlas to Texture.