- Home /
Specular reflection problem with day/night simulation
Hello! I've got stuck with one problem. Im using unity3d 5, and recently i've created simply day/night system, that rotates sun, and changes some parameters such as: RenderSettings.ambientLight and RenderSettings.reflectionIntensity. So RenderSettings.ambientLight prefectly updates with every change i've made, but when i change RenderSettings.reflectionIntensity parameter via script like this:
RenderSettings.reflectionIntensity = ReflectionIntensity;
Inspector variable changes, but Standart (specular setup) material don't updates. Basicly what i want - set reflection intensity at day to maximum, and at night - to minimum. Most intresting thing is: when day passed and night has come (inside my project) and RenderSettings.reflectionIntensity updated ( to 0, for example), and i manualy drag slider with RenderSettings.reflectionIntensity - it updates.
Am attaching screenshots:
Hope that somebody can help me with this problem, thanks for reading this!
Answer by HIPED · Apr 23, 2015 at 01:32 PM
Hi, I have the same problem. Using the slider works but it doesn't update when it is set by script. Seems to be a bug :(
Answer by yuanxing_cai · Jun 11, 2015 at 09:09 AM
Hi, Unity dev here!
This is a bug and we'll fix it. It's likely to happen in 5.2 but we can make it into a 5.1 patch release if it's a blocker to your project.
Well,will wait untill bug will be fixed. Thanks for reply
Your answer
Follow this Question
Related Questions
day/night cycle runs only twice 1 Answer
Day/Night Skybox 1 Answer
I can't get my script to work I get an error. [Please Help!] 0 Answers
Timed event Question 2 Answers
How to make a Day/Night Cycle? 2 Answers