Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: wijesijp on June 04, 2015, 12:02:57 AM

Title: importer.GetNPOTScale() == TextureImporter::kNPOTKeep
Post by: wijesijp on June 04, 2015, 12:02:57 AM
When I try to bring any images to Atlas Maker I get following error

I am using Unity 4.6.5
NGUI 3.8.2

Any suggestions on how to fix this?

  1. importer.GetNPOTScale() == TextureImporter::kNPOTKeep
  2. UnityEditor.AssetDatabase:ImportAsset(String, ImportAssetOptions)
  3. NGUIEditorTools:MakeTextureAnAtlas(String, Boolean, Boolean) (at Assets/NGUI/Scripts/Editor/NGUIEditorTools.cs:489)
  4. NGUIEditorTools:ImportTexture(String, Boolean, Boolean, Boolean) (at Assets/NGUI/Scripts/Editor/NGUIEditorTools.cs:503)
  5. NGUIEditorTools:ImportTexture(Texture, Boolean, Boolean, Boolean) (at Assets/NGUI/Scripts/Editor/NGUIEditorTools.cs:522)
  6. UIAtlasMaker:ExtractSprites(UIAtlas, List`1) (at Assets/NGUI/Scripts/Editor/UIAtlasMaker.cs:555)
  7. UIAtlasMaker:UpdateAtlas(List`1, Boolean) (at Assets/NGUI/Scripts/Editor/UIAtlasMaker.cs:687)
  8. UIAtlasMaker:OnGUI() (at Assets/NGUI/Scripts/Editor/UIAtlasMaker.cs:1055)
  9. UnityEditor.DockArea:OnGUI()
Title: Re: importer.GetNPOTScale() == TextureImporter::kNPOTKeep
Post by: r.pedra on June 04, 2015, 03:58:05 AM
Seems to be related to the Power Of Two setting of the texture.
Title: Re: importer.GetNPOTScale() == TextureImporter::kNPOTKeep
Post by: wijesijp on June 04, 2015, 07:39:22 AM
The textures, do they have to be power of two  ?
Title: Re: importer.GetNPOTScale() == TextureImporter::kNPOTKeep
Post by: r.pedra on June 05, 2015, 03:47:24 AM
Nope
Title: Re: importer.GetNPOTScale() == TextureImporter::kNPOTKeep
Post by: ArenMook on June 07, 2015, 12:46:24 PM
Do you have some other script or addon that has a texture post-processor? That would indeed cause a problem if it tries messing with textures while NGUI is using them.
Title: Re: importer.GetNPOTScale() == TextureImporter::kNPOTKeep
Post by: justin on June 11, 2015, 12:39:58 AM
I am experiencing this issue as well, even in a brand new empty project.

Unity 5.0.2f1
NGUI 3.9.0

This seems to only happen if the project was originally created in 2D mode.
Title: Re: importer.GetNPOTScale() == TextureImporter::kNPOTKeep
Post by: ArenMook on June 11, 2015, 06:44:10 AM
Ah, 2D mode... Unity force-imports textures as sprites in 2D mode.
Title: Re: importer.GetNPOTScale() == TextureImporter::kNPOTKeep
Post by: justin on June 11, 2015, 09:10:49 AM
I tried switching to 3D mode, reimporting the files, and building the atlas again. No luck.
Title: Re: importer.GetNPOTScale() == TextureImporter::kNPOTKeep
Post by: ArenMook on June 11, 2015, 09:20:32 AM
Select the atlas texture and manually change its import settings to use Advanced texture type, not sprite type.
Title: Re: importer.GetNPOTScale() == TextureImporter::kNPOTKeep
Post by: justin on June 11, 2015, 09:24:53 AM
Aha, of course. Thanks.