Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: ChrisR on July 11, 2013, 09:09:34 AM

Title: Exposing Material and Shader Controls on the UITexture Class
Post by: ChrisR on July 11, 2013, 09:09:34 AM
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
Title: Re: Exposing Material and Shader Controls on the UITexture Class
Post by: ArenMook 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.
Title: Re: Exposing Material and Shader Controls on the UITexture Class
Post by: ChrisR 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.