Search Unity

Changing Ambient Color from script ?

Discussion in 'Unity 5 Pre-order Beta' started by BigB, Feb 20, 2015.

  1. BigB

    BigB

    Joined:
    Oct 16, 2008
    Posts:
    668
    Can this be done ?
    I know I can change it under Lighting , but how do I change this from a script ?
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    2,840
    Try RenderSettings.ambientSkyColor
     
    Aseemy likes this.
  3. BigB

    BigB

    Joined:
    Oct 16, 2008
    Posts:
    668
    Nope, that does not work :(
     
  4. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    484
    Is your Ambient Source using Skybox mode? Need to set it to Gradient or Color mode and It should work.
     
  5. BigB

    BigB

    Joined:
    Oct 16, 2008
    Posts:
    668
    Yeah it works, my bad :)
     
unityunity