iTween FadeTo on a GameObject with more then one material assigned

iTween doesn't seem to apply alpha fades to all the materials assigned to a gameObject, works fine on materials[0]. Would be great if it did, so I didn't have to maintain two lots of fading code. :-)

Cheers.

3 Answers

3

This sounds a bit like a feature request. As I think the source code of iTween is available, you might consider implementing this feature and donating it back to the project.

I've been doing too much coding and not enough digging into 3D and actual Unity. Can you explain how I can add multiple materials on a cube generated inside Unity so I can look into adding this functionality to iTween? Thanks!

Yep no probs. Just create your cube, then under the Materials expando in the inspector change size to something other then 1. Assign your materials to the newly expanded materials array. Obviously won't do much as you really need a mesh with material group sets. If you want I'm happy to send you a 3d mesh file setup to use multiple materials. Or if you want to point me in the right direction within your code base I'm happy to code the required changes.... Cheers.

the materials expando is found under the mesh renderer. just to be clear. ;-)

Would love a sample file to play around with. You can grab my email address from the support page (http://itween.pixelplacement.com/support.php) . Thank you and I'll let you know when I have something for you to test (after you send a file). Thanks!

ok will do. cheers.

iTween now affects every material on an object correctly. Thanks a million for the sample file @thylaxene and the suggestion as well. Go grab version 2.0.13 for this addition.

I know this is an old post, but that's awesome so thanks for being so responsive to questions.