Author Topic: Adding a material to NGUI objects  (Read 3810 times)

dendenny01

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 4
    • View Profile
Adding a material to NGUI objects
« on: June 11, 2015, 11:19:29 PM »
How can i add a material to UITexture.
I want to use Mobile Movie Texture.where i need to add a material on which video will be played.But when material is added the texture remain transparent and does not fill with the added material. Material has a shader.
« Last Edit: June 12, 2015, 12:10:15 AM by dendenny01 »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Adding a material to NGUI objects
« Reply #1 on: June 12, 2015, 08:09:37 AM »
In short -- specifying a material is enough. In depth, it's dependent on the shader used by the material. NGUI generates position, UVs for MainTex, and colors. It won't generate normals unless you enable it on the panel. Check the shader you're using in the material -- does it even use MainTex? If it's something like a cube map, it simply won't work.