Author Topic: Atlas Maker Malfunctioning in NGUI 3.5.1 with Unity 4.3.4f1  (Read 3821 times)

arcifus

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Atlas Maker Malfunctioning in NGUI 3.5.1 with Unity 4.3.4f1
« on: February 26, 2014, 12:57:27 PM »
I'm unable to generate a simple atlas. I've attached the screenshots of the result I'm getting and the sample sprites I'm using. This issue replicates on a new project set to 2D mode (Edit->Project Settings->Editor->Default Behaviour Mode->2D) and the platform iOS. Anyone know whats happening here?




ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Atlas Maker Malfunctioning in NGUI 3.5.1 with Unity 4.3.4f1
« Reply #1 on: February 26, 2014, 02:51:11 PM »
Seems to work fine over here. Your sprites pack into an atlas with the size of 1024x2048, but my default behaviour mode remains as 3D. The scene view is set to 2D though. What size is your final atlas texture after creating the atlas? Maybe your quality settings are set to fastest, limiting it to 1024x1024?

By the way, I would strongly advise you to reconsider your sprites. PLAY and REPLAY buttons in particular... text should be just that -- text (labels), and their background can be done using a very small sliced sprite. Same with a few other sprites you have in there.

arcifus

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Atlas Maker Malfunctioning in NGUI 3.5.1 with Unity 4.3.4f1
« Reply #2 on: February 27, 2014, 01:08:23 AM »
The final Atlas size I'm getting is 512x1024 (see attachments).

Sorry if I didn't make it clear before but this problem ONLY occurs when you follow this sequence:
1) Create new project
2) Switch editor settings to 2D
3) Switch platform to iOS
4) Import the sprites
5) Try to create the Atlas

Another thing I noticed is that the png generated is 1024x2048 but the Atlas Maker is displaying its size as 512x1024.

P.S. This was part of a blitz prototype and therefore the giant button sprites etc.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Atlas Maker Malfunctioning in NGUI 3.5.1 with Unity 4.3.4f1
« Reply #3 on: February 27, 2014, 05:38:07 PM »
You likely have your max texture size set to 1024x1024, which is why it's not possible to create a proper size atlas.

Those sprites can't fit into a single 1024x1024 texture.

arcifus

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Atlas Maker Malfunctioning in NGUI 3.5.1 with Unity 4.3.4f1
« Reply #4 on: February 28, 2014, 12:06:18 AM »
Ah yes that was it, thanks Aren!

Isn't that a minor bug though that NGUI should set the correct texture size in the import settings since it creates the new atlas file? And if thats not possible then perhaps toss out a console warning in such cases.

Cheers.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Atlas Maker Malfunctioning in NGUI 3.5.1 with Unity 4.3.4f1
« Reply #5 on: February 28, 2014, 07:45:16 PM »
NGUI does error out if what you're trying to do can't fit into a texture. However the texture does get created at 2048 just fine. It's the Unity import that imports it as 1024, and NGUI has nothing to do with that.