Change Material

hello all

so first, i don’t have any scripting skillz, because i am a 3d artist (3d studio max 2008 x64)

i will do a car configurator in unity 3d…

what i have to do:

-change materials (shader color) “_MainColor” “_HighligthColor” etc. whit buttons.

if i try with

renderer.sharedMaterial.color…

it works, but how can i access the main “_MainColor”
“_HighligthColor” etc. of the Shader?

-change model of the rim’s (as example)

:roll:

how i script this?

any help :idea: will be great for me!!!

:cry:

cheers

michael

Declaration In Script:

Shader shader = Shader.Find(“Path/YourShaderName”); // Default shader

Material material;

// under your function:
material.shader = shader;

material.SetVector(“_params”, setting);

Don’t think like that. A human being can do more than one thing.

The “Functions” section, here, has a list of what you need, and examples of how to do it.

in a few words, thank you very very much!!!
that help me a lot…

best regards

michael