Author Topic: Loosing Atlas and Font when opening project or swapping platforms  (Read 4823 times)

bytewrench

  • Guest
Hey everyone, this is my first post. I work for a small game company and have been using NGUI for a month or so, and have been writing software for around 20+ years. I am having a problem, that each time I save, close and reopen my project, I always have to rebuild my Atlas, and my Font. It also happens most every time I switch over to compile for a different platform. I have tried storing my project on different drives, thinking it could be an access issue, but to no avail. Anyone else run into this? Thanks for reading! -eric

PhilipC

  • Guest
Re: Loosing Atlas and Font when opening project or swapping platforms
« Reply #1 on: August 14, 2012, 10:47:18 AM »
It seems to me that unity is not saving properly. What version of Unity are you using (maybe something new in 4)?

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
Re: Loosing Atlas and Font when opening project or swapping platforms
« Reply #2 on: August 14, 2012, 11:12:35 AM »
As I can remember, I had the same problem (sprites cut like that) when I tried to load too many sprites in my atlas and they won't fit.

Do you have a lot of sprites in one atlas that is already 2048x2048 ? If yes, try to look the texture atlas and see if your sprites are correct (not cut).
If they are, you probably need 2 atlas.

bytewrench

  • Guest
Re: Loosing Atlas and Font when opening project or swapping platforms
« Reply #3 on: August 14, 2012, 01:00:27 PM »
Thanks guys,

I am still on 3.5.5f2, and my atlas has quite a bit of free room left. And I agree, it seems that something is not saving because I still get the [remove] /
  • buttons next to images that have long since been removed from the project. I am going to install the latest update of Unity now and see (hopefully) if it helps anything. I will report back what I find in case it helps anyone else. -eric

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
Re: Loosing Atlas and Font when opening project or swapping platforms
« Reply #4 on: August 14, 2012, 01:03:25 PM »
Maybe you should try to start with a fresh atlas reimporting the right things ?

bytewrench

  • Guest
Re: Loosing Atlas and Font when opening project or swapping platforms
« Reply #5 on: August 14, 2012, 01:06:46 PM »
I have done that a couple times, but I will try again. Willing to try anything! (btw, I just realized that I am running the latest version of Unity as far as I can tell). I had tried to update NGUI to the latest version but ran into all sorts of problems because of the way the initial project was set up. That could be root of all my problems (pun intended) Thanks again!

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
Re: Loosing Atlas and Font when opening project or swapping platforms
« Reply #6 on: August 14, 2012, 01:11:25 PM »
Can you show us your final atlas texture ?
Sometimes, even if it has some space, that doesn't mean everything could find a spot.

bytewrench

  • Guest

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
Re: Loosing Atlas and Font when opening project or swapping platforms
« Reply #8 on: August 14, 2012, 01:17:20 PM »
Well... it looks completely ok to me, sorry :(

bytewrench

  • Guest
Re: Loosing Atlas and Font when opening project or swapping platforms
« Reply #9 on: August 14, 2012, 01:34:24 PM »
I'm wrestling with the NGUI update now, but I will report back if there is an improvement. Thank you again so much!

[edit]
made copy of my project
removed all ngui stuff
imported new ngui
"Multi-object editing not supported"
dang..
« Last Edit: August 14, 2012, 01:54:02 PM by bytewrench »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Loosing Atlas and Font when opening project or swapping platforms
« Reply #10 on: August 14, 2012, 03:38:08 PM »
Atlas may have space left, but adding a long & narrow sprite may still cause Unity to increase the size. The custom packer may work better in this case if you choose to use it. Be sure to hit Ctrl+S after every change to your atlas.