Change tint color of main skybox material in script

How can I access the tint color property of the main skybox material through scripting? Trying RenderSettings.skybox, the material returned does not have a color property to edit.

more ▼

asked Jun 15 '11 at 06:01 PM

jlink gravatar image

61 7 8 10

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

That's because it uses _Tint instead of _Color (you can see this in the shader file); you can use SetColor("_Tint"... instead.

more ▼

answered Jun 15 '11 at 06:44 PM

Eric5h5 gravatar image

102k 49 165 620

You're the man.

Jun 15 '11 at 06:59 PM jlink

Is there a way to get it to create a temp version once you mod the material? Because whenever I change the settings it stays the same as last played..

Jul 05 '11 at 03:18 AM 3dDude

@3dDude: you can instantiate a copy at runtime and use that instead.

Jul 05 '11 at 03:23 AM Eric5h5
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: Jun 15 '11 at 06:01 PM

Seen: 3666 times

Last Updated: Jul 05 '11 at 03:23 AM