Author Topic: Texture not being drawn on Android with NGUI 2.7.0  (Read 6305 times)

Novafly

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 2
    • View Profile
Texture not being drawn on Android with NGUI 2.7.0
« on: June 24, 2014, 07:51:04 AM »
Hello guys!

Ive been searching the web for anyone having a similar problem, as you'd expect by now my search went rather unhelpful. So heres the deal: im trying to draw a simple Sprite on the screen for an introduction to a game, nothing special. For some reason that i havent figure dout yet, the Sprite im trying to draw doesnt show up, unlike i read in the most topics that have somewhat similar issues, my sprite wont even show up as a white/black box. Its as if Android decides it doesnt like my Texture and doesnt even consider rendering it. I tried using "UISprite" with an atlas that is none greater than 2048 x 2048 pixels. I even tried drawing the texture directly with "UITexture", also to no avail. Ive checked the common texture compression formats for my android device and im certain that they are supported. I also tested Multi-Threaded rendering on//off, since ive read a topic that this may cause some problems for certain devices, also no success here. NGUI is capable of drawing dynamic fonts onto the screen wich i used for Debug messages during development. I am also certain that my NGUI hierarchy is being setup correctly. Last but not least ive searched through my code in hope, id find something i put there that causes the texture to not be rendered. Ive been looking through this for 2 days now reading my code and on the Internet and believe me, how i wish the problem would just be my own stupidity :D I am runnign the same build on an IOS device aswell and everythign works just fine on it (iphone and ipad, both doing fine) so im very sure this must be an android only problem.

However ive been thinkign about this, could it be possible that the old free version of NGUI (2.7.0) could be the cause of this? maybe its just not forged for new Android devices? Or has anyone and idea of somethign that i didnt try yet? If you need additional information, ill try to hand them out asap, just ask for it. Resolving this problem is very important for me and id apreciate every little help i could get.

sstublic

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 15
    • View Profile
Re: Texture not being drawn on Android with NGUI 2.7.0
« Reply #1 on: June 24, 2014, 07:57:04 AM »
This may be a completely unrelated issue, but you might try it anyway: http://www.tasharen.com/forum/index.php?topic=10087.0

In order to test if you're having the same issue, change the shader on the material for your atlas and try if anything is rendered then.


Novafly

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Texture not being drawn on Android with NGUI 2.7.0
« Reply #2 on: June 24, 2014, 08:23:16 AM »
thaaaaaanks sooooooo muuuuuch!!! this fixed the problem, i can now draw the texture!
sstublic for president :D
So the only way to use NGUI's own shaders then would be to buy a license with the updated shaders i guess?

sstublic

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 15
    • View Profile
Re: Texture not being drawn on Android with NGUI 2.7.0
« Reply #3 on: June 24, 2014, 09:06:40 AM »
Whats that license? I'm using NGUI 3.6.1 and I'm having the same issue.

I'd say the problem lies elsewhere, some new incompatibilities between latest Unity and NGUI, but its just wild guessing.

I expect NGUI to resolve this.