Author Topic: [Simple Texture] Displayed black when running on iPad  (Read 5539 times)

cayou

  • Jr. Member
  • **
  • Thank You
  • -Given: 3
  • -Receive: 3
  • Posts: 90
    • View Profile
[Simple Texture] Displayed black when running on iPad
« on: May 07, 2012, 09:17:53 AM »
Hi everybody,
I'm trying to add a simple texture to my GUI, so I added a "simple texture" to my panel, then I created a new material, transparent diffuse, with the texture I want to display.
This texture appears in my scene/game view, even when I launch it, but when I compile to test it on my iPad3 everything is displaying well except the texture, which is black.
It's strange because I see a "shadow" version of the texture, like the texture without light (full black).
I tried to change the shader of the material, by adding a self illuminated, or simply diffuse, without any success.
Any help?

Thanks.

cayou

  • Jr. Member
  • **
  • Thank You
  • -Given: 3
  • -Receive: 3
  • Posts: 90
    • View Profile
Re: [Simple Texture] Displayed black when running on iPad
« Reply #1 on: May 07, 2012, 09:24:42 AM »
I resolved it by adding a sprite rather than a texture (and the texture to an Atlas), but my question still remains :)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: [Simple Texture] Displayed black when running on iPad
« Reply #2 on: May 07, 2012, 10:49:38 AM »
You need to use an Unlit shader.

cayou

  • Jr. Member
  • **
  • Thank You
  • -Given: 3
  • -Receive: 3
  • Posts: 90
    • View Profile
Re: [Simple Texture] Displayed black when running on iPad
« Reply #3 on: May 07, 2012, 12:01:03 PM »
thanks, I'll try :)

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: [Simple Texture] Displayed black when running on iPad
« Reply #4 on: May 07, 2012, 02:30:42 PM »
myUITexture.material = new Material(Shader.Find("Unlit/Transparent Colored"));