|
|
|
| View previous topic :: View next topic |
fallingbrickwork

Joined: 16 Mar 2009 Posts: 221 Location: Co Donegal, Ireland
|
Posted: Sat Nov 07, 2009 7:52 pm Post subject: Accessing second material |
|
|
|
Hi all,
I am using SetTexture to change a material's texture at runtime and everything is working great. My problem is that some of my models have multiple materials and it is not always the first material's texture i need to change.
How can I access a model's second material or third etc and use SetTexture to change them?
Btw, I'm coding in C#
Many thanks in advance,
Matt.
_________________ Horror - FPS && ProjectX2
FearedFutureGames website: fearedfuturegames.com
Check out my youtube: fallingbrickwork's YouTube Channel
Dev Route: Modo 401, Unity Pro, VS2008 |
|
| Back to top |
|
|
Jessy

Joined: 07 Jun 2007 Posts: 2757 Location: NE Ohio, USA
|
|
| Back to top |
|
|
fallingbrickwork

Joined: 16 Mar 2009 Posts: 221 Location: Co Donegal, Ireland
|
Posted: Sat Nov 07, 2009 9:50 pm Post subject: |
|
|
|
Thanks Jessy and sorry for even asking the question... i looked in the scripting reference and didn't even see renderer.materials! My fault, i was using renderer.material
Thanks again for pointing me to it.
Regards,
Matt.
_________________ Horror - FPS && ProjectX2
FearedFutureGames website: fearedfuturegames.com
Check out my youtube: fallingbrickwork's YouTube Channel
Dev Route: Modo 401, Unity Pro, VS2008 |
|
| Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|
|
|
|