- Home /
This question was
closed Nov 30, 2013 at 08:12 PM by
Eric5h5 for the following reason:
Duplicate Question
Question by
Carbongrip · Nov 30, 2013 at 06:22 PM ·
c#colorhalo
Change Halo Color with Code
I have a halo on a object… how can I call tell it via script to change to a color I want?
Comment
Duplicate question: http://answers.unity3d.com/questions/10534/changing-color-of-halo.html
Answer by Jamster · Nov 30, 2013 at 07:40 PM
The halo colour changes with the colour of your light, so change the colour of your light using Light.color :)
No, the question is referring to the halo component which is attached to an object, where you change the color in the inspector; it's not related to lights.
You can . It is possible with the following code .
private void Start() {
SerializedObject halo = new SerializedObject(this.gameObject.GetComponent("Halo"));
halo.FindProperties("m_Color").colorvalue=Color.red;
halo.Apply();
}