- Home /
Change Ambient Color in Unity 5 via script?
Hi Guys
I just pre-ordered Unity 5 and its Beta-Version is awesome so far! I converted my Unity 4 Project into a Unity 5 Project. There seems to be no Render-Settings any more. Until now I always changed the Color of my Ambient Light like this (JavaScript!):
RenderSettings.ambientLight = Color.red;
But somehow that doesn't work anymore. Unity doesn't give me any error message but nothing happens in Play Mode! I know that the Ambient Color in Unity 5 can now be set in the "Lighting Tab" but I don't know how to access this value via script...
So does anybody know how to change the Ambient Color in Unity 5 via script?
Thanks for your help!
Answer by EvilTak · Dec 06, 2014 at 01:13 PM
If what you meant is this (Unity 5 b14):
Then use RenderSettings.ambientSkyColor. Note: I have lerped the color to demonstrate.
That's exactly what I meant! Thanks a lot Evil Tak! :)