Search Unity

Getting the halo property of a light source through script

Discussion in 'Scripting' started by jimma, Oct 21, 2014.

  1. jimma

    jimma

    Joined:
    Apr 3, 2013
    Posts:
    28
    I am adding point lights in my scene ( max 6 ) and I want to be able to enable its Halo property via script. However in the documentation reference, they haven't mentioned how to enable the halo property of a light source via script.

    This is what I have so far in the script.

    GameObject lightObj =newGameObject("Light");
    lightObj.AddComponent<Light>();
    lightObj.light.color =Color.blue;
    lightObj.transform.position = city.transform.position +newVector3(-6.0f,0,0);


    Point Lights have a property "Draw Halo" on the Inspector but how do I enable it via script?​
     
  2. cl9-2

    cl9-2

    Joined:
    May 31, 2013
    Posts:
    417