Author Topic: Atlas Reference breaks when adjusting slice  (Read 2927 times)

schellenberghq

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 31
  • Game Programmer
    • View Profile
    • Blog
Atlas Reference breaks when adjusting slice
« on: November 13, 2013, 04:03:09 PM »
Hey, I'm using a hi/low def atlas with a reference. I ensure that all my sprites are using the reference. The problem is, if I adjust the slicing of a sprite, the reference breaks and any sprites with the adjusted slice now only refers to the non-reference atlas.

For example, if I have a button with a Background sprite, and its atlas is GUI_Atlas_Reference and that currently points to GUI_Atlas_160, if I adjust the slicing in the GUI_Atlas_160, the background sprite no longer points to GUI_Atlas_Reference, it now points to the last atlas the reference was pointing at, which in this case would be GUI_Atlas_160.

The problem is, because the 2 atlases may require difference slicing for the same sprite, I try to get them close, but I have to keep going back to my gameObject sprite and reattach the GUI_Atlas_Reference.

I could get through this by just ensuring all my slices are done right in the first place, but sometimes it's difficult to adjust the slicing correctly without seeing the end result in the scene.

perhaps this could be resolved in NGUI?

Thanks!
---------------------------
Jacob S.
Game Programmer
---------------------------

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Atlas Reference breaks when adjusting slice
« Reply #1 on: November 13, 2013, 04:06:44 PM »
Sounds strange... I will look into it. You can probably also get around it by starting a new scene, and then modifying the slicing. It won't affect UIs that aren't in the scene.

schellenberghq

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 31
  • Game Programmer
    • View Profile
    • Blog
Re: Atlas Reference breaks when adjusting slice
« Reply #2 on: November 13, 2013, 04:12:19 PM »
Thanks for the quick reply! I look forward to seeing some pull notifications in bitbucket. It's like christmas every time.
---------------------------
Jacob S.
Game Programmer
---------------------------

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Atlas Reference breaks when adjusting slice
« Reply #3 on: November 13, 2013, 04:25:21 PM »
Found the issue, fix is live. Good to be a Pro user, eh? :)

schellenberghq

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 31
  • Game Programmer
    • View Profile
    • Blog
Re: Atlas Reference breaks when adjusting slice
« Reply #4 on: November 13, 2013, 04:27:18 PM »
One day if we meet, I will shake your hand and say, "Thanks for the hotfix."
Best developer of the year award.
---------------------------
Jacob S.
Game Programmer
---------------------------

David Foster

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: Atlas Reference breaks when adjusting slice
« Reply #5 on: November 14, 2013, 12:38:04 PM »
Sadly this bug has wasted a lot of my time by forcing me to manually go through the hierarchy and repoint UIWidget atlases to the reference atlas whenever slice dimensions are adjusted. It's good to hear it's fixed (and was done so very quickly!) but when can we expect this in a release?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Atlas Reference breaks when adjusting slice
« Reply #6 on: November 14, 2013, 01:24:03 PM »
Next public release. It won't be this weekend as I'll be jet lagged after returning from Copenhagen, so most likely the weekend after.