Author Topic: New Sprites no longer show up after deleting old sprites  (Read 5336 times)

Teonnyn

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
New Sprites no longer show up after deleting old sprites
« on: March 13, 2014, 11:17:11 PM »
I'm having an issue with my atlas where I've removed a number of older graphic from it. After deletion, if I add a new graphic to the atlas the new graphic does not show when added to the UI as a sprite. This applies to both the Scene and Game views, and if I change a new sprite to one already placed into the editor, the UISprite object still doesn't show anything. The only thing I can think of doing is rebuilding the atlas entirely, but I want to leave that as a last resort. On a note, this seems to start happening after five-ten sprites are deleted from the atlas.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: New Sprites no longer show up after deleting old sprites
« Reply #1 on: March 14, 2014, 11:27:54 AM »
I don't understand your post. The topic is talking about deleting sprites, but in the post you talk about adding. Which one is it then? And what version of NGUI are you using? Are you saving the atlas after each modification? Which sprites are you removing and which sprites are being used? Did you hit Play at any point to see if that fixes it? You need to provide more info here.

Teonnyn

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: New Sprites no longer show up after deleting old sprites
« Reply #2 on: March 14, 2014, 06:00:38 PM »
Okay, let me try to clarify. The original post was written kind of late at night for me.

In my thoughts:
Graphics = Graphic files contained in the folder.
Sprites = Graphics added to the atlas itself.

I had a number of sprites that were no longer needed in my Atlas.
So, I deleted each unwanted sprite out of it, then saved. I was not aware there was a way to save the atlas
without saving the project itself.  After I deleted the sprites, I wanted to add one more graphic to the atlas.

The new sprite was added to the atlas successfully.

However, when I created a UISprite object within the GUI, and selected the new sprite in the atlas, it does not show
in either the Editor or the Game View - with or without Play enabled. In effect, no new UISprite objects can be placed,
while the old still retain their sprites correctly.

I am currently using NGUI Version v3.5.3.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: New Sprites no longer show up after deleting old sprites
« Reply #3 on: March 14, 2014, 08:32:17 PM »
What shows then? And have you looked at the atlas texture to see if your newly added sprite is there? Just to confirm, when you add a sprite via ALT+SHIFT+S, you do choose a new sprite by clicking on the Sprite button and selecting a new one, correct?

Teonnyn

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: New Sprites no longer show up after deleting old sprites
« Reply #4 on: March 14, 2014, 08:39:45 PM »
To create the object on screen, I then add a sprite via the NGUI menu and select the sprite from the
atlas. However, only the outline of the UISprite placed object appears, but no sprite is visible in it.
When this bug pops up, it won't actually show ANY sprites in the new UISprite object - the new, or
previously existing sprites.

I don't actually add sprites by Alt+Shift+S, I add by "Add/Update" in the NGUI Atlas Maker.
I did not know about that shortcut.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: New Sprites no longer show up after deleting old sprites
« Reply #5 on: March 15, 2014, 03:48:10 PM »
ALT+SHIFT+S creates a UISprite object in your scene. Add/Update actually adds (or removes) textures to/from your texture atlas that's used by UISprites. My question remains unanswered: "And have you looked at the atlas texture to see if your newly added sprite is there?"