Author Topic: Problem with NGUI Unity 2D Sprite across devices  (Read 2785 times)

Omega

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Problem with NGUI Unity 2D Sprite across devices
« on: February 05, 2015, 05:56:04 PM »
I've posted this at http://gamedev.stackexchange.com/q/93518/4779 as well, but figures this is the better place for asking this.

I have a problem with NGUI for Unity, using the Unity 2D Sprite objects.

First, have this image:



And then create an NGUI Unity 2D Sprite object in the scene. Apply this image and you get this:



Very odd. This doesn't happen if you use an Unity UI Image object or a SpriteRenderer component. But I really need to use NGUI's Unity 2D Sprite.

Then I ran the scene in several devices. Some of them display the sprite correctly - but others do not. Look:



  • Top-left device: iPad Mini 1: The sprite is bad.
  • Top-right device: iPad Mini 3: The sprite is good.
  • Bottom-left device: iPhone 5c: The sprite is bad.
  • Top-right device: iPhone 6 plus: The sprite is good.

I fail to understand what is the problem.

Again, this doesn't happen with sprites rendered with SpriteRenderer or Unity's builtin UI Sprite system. However, I need to do this with NGUI.

NGUI has a "NGUI Sprite" which I believe does work. But I don't want to use that one - I need to use the "NGUI Unity 2D Sprite" option.

Any ideas?

Using Unity 5.0.0b20
« Last Edit: February 05, 2015, 06:01:38 PM by Omega »

Omega

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Problem with NGUI Unity 2D Sprite across devices
« Reply #1 on: February 05, 2015, 06:20:48 PM »
Found the solution.

In the inspector, uncheck "Generate Mip Maps", and it will now work.

I do not know if such behavior is expected of NGUI. Perhaps it is a bug of some sort? Either way, I'm good now :).