Bryan Anthony Garcia Bryan Anthony Garcia - 12 days ago 6
C# Question

How can I change the value of 'Draw Halo' inside Point Light - Unity3D

I can't seem to find a Draw Halo property in the intellisense. Is there a way to set its value programmatically? Thanks!

Answer

Halo is a separate component.

To add a halo to a light: AddComponent<Halo>()

To access the halo attached to a light: GetComponent<Halo>()

The "Draw Halo" checkbox in the inspector is a bit of a red herring -- it creates a Halo component which is then hidden from the hierarchy view, which is boneheaded but it's preserved from older versions of Unity.

Comments