Author Topic: Exposing Material and Shader Controls on the UITexture Class  (Read 4586 times)

ChrisR

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 33
    • View Profile
Hey all,

Wondering if it's possible to expose the material controls in the animation window when you're creating an animation for a UITexture gameobject? Reason for this is that we want to make a combined prefab with a UITexture object and Particle object, and we'd like to keep as much inside NGUI as possible.

(The UITexture is setup by assigning a material to it's material slot, so it's not generating a dynamic material right now.)

Thanks very much for any help!

Regards,

Chris

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Exposing Material and Shader Controls on the UITexture Class
« Reply #1 on: July 11, 2013, 07:42:33 PM »
I suggest you write an intermediate script for that with a public variable (public Texture tex; for example), and animate that. In that script's update function, simply set the UITexture's mainTexture every Update if it changes.

ChrisR

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 33
    • View Profile
Re: Exposing Material and Shader Controls on the UITexture Class
« Reply #2 on: July 12, 2013, 04:48:34 AM »
Hey Aaron,

Thanks for that! Will get one of our coders to write it like you suggested.