x


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, 2011 at 06:01 PM

jlink gravatar image

jlink
61 22 16 18

(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, 2011 at 06:44 PM

Eric5h5 gravatar image

Eric5h5
108k 54 181 650

You're the man.

Jun 15, 2011 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, 2011 at 03:18 AM 3dDude

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

Jul 05, 2011 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

By RSS:

Answers

Answers and Comments

Topics:

x7
x6

asked: Jun 15, 2011 at 06:01 PM

Seen: 4068 times

Last Updated: Jul 05, 2011 at 03:23 AM