Author Topic: importer.GetNPOTScale() == TextureImporter::kNPOTKeep  (Read 8144 times)

wijesijp

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 6
    • View Profile
importer.GetNPOTScale() == TextureImporter::kNPOTKeep
« 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()

r.pedra

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 20
  • Posts: 131
    • View Profile
Re: importer.GetNPOTScale() == TextureImporter::kNPOTKeep
« Reply #1 on: June 04, 2015, 03:58:05 AM »
Seems to be related to the Power Of Two setting of the texture.

wijesijp

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: importer.GetNPOTScale() == TextureImporter::kNPOTKeep
« Reply #2 on: June 04, 2015, 07:39:22 AM »
The textures, do they have to be power of two  ?
« Last Edit: June 04, 2015, 01:29:06 PM by wijesijp »

r.pedra

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 20
  • Posts: 131
    • View Profile
Re: importer.GetNPOTScale() == TextureImporter::kNPOTKeep
« Reply #3 on: June 05, 2015, 03:47:24 AM »
Nope

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: importer.GetNPOTScale() == TextureImporter::kNPOTKeep
« Reply #4 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.

justin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: importer.GetNPOTScale() == TextureImporter::kNPOTKeep
« Reply #5 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.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: importer.GetNPOTScale() == TextureImporter::kNPOTKeep
« Reply #6 on: June 11, 2015, 06:44:10 AM »
Ah, 2D mode... Unity force-imports textures as sprites in 2D mode.

justin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: importer.GetNPOTScale() == TextureImporter::kNPOTKeep
« Reply #7 on: June 11, 2015, 09:10:49 AM »
I tried switching to 3D mode, reimporting the files, and building the atlas again. No luck.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: importer.GetNPOTScale() == TextureImporter::kNPOTKeep
« Reply #8 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.

justin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: importer.GetNPOTScale() == TextureImporter::kNPOTKeep
« Reply #9 on: June 11, 2015, 09:24:53 AM »
Aha, of course. Thanks.